Refactoring the worker / db init flow.
This commit is contained in:
1 parent
cfaf7ad72f
commit
6dfe98b655
5 files changed
+57
-48
No files matched your search
+10
-6
@@ -439,12 +439,16 @@ export const putGpx = async (params: any) => {
|
||||
|
||||
await put(id, 'gpx', (doc) => gpx, gpx);
|
||||
if (extensions !== undefined) {
|
||||
await put(
|
||||
`${id}/4extensions`,
|
||||
'extensions',
|
||||
(doc) => extensions,
|
||||
extensions
|
||||
);
|
||||
try {
|
||||
await put(
|
||||
`${id}/4extensions`,
|
||||
'extensions',
|
||||
(doc) => extensions,
|
||||
extensions
|
||||
);
|
||||
} catch (error) {
|
||||
console.error({ caller: 'putGpx / extensions', error });
|
||||
}
|
||||
}
|
||||
|
||||
if (previousShared !== extensions?.shared) {
|
||||
|
||||
@@ -99,5 +99,7 @@ export const initDb = async () => {
|
||||
|
||||
globalThis.dbReady = true;
|
||||
watchDbLegacy();
|
||||
console.log({ caller: 'initDb / done' });
|
||||
return;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user