Starting to implement a proper UI for GPX import.
This commit is contained in:
1 parent
3a5f5260c8
commit
31bec02496
7 files changed
+165
-57
No files matched your search
@@ -50,7 +50,7 @@ const changeHandler = async (change: any) => {
|
||||
(doc) => {
|
||||
console.log({ caller: 'changeHandler / gpxes', doc });
|
||||
doc.push(id);
|
||||
doc.sort().reverse();
|
||||
doc.reverse().sort().reverse();
|
||||
return doc;
|
||||
},
|
||||
[]
|
||||
|
||||
+2
-5
@@ -20,13 +20,10 @@ export const put = async (
|
||||
db.put({ _id, _rev: current._rev, type, doc: update(current.doc) });
|
||||
} catch (error: any) {
|
||||
if (error.name === 'conflict') {
|
||||
console.log({ caller: 'db.put', _id, type, defaultDoc, error });
|
||||
await put(_id, type, update, defaultDoc);
|
||||
} else {
|
||||
console.error(
|
||||
`put(${_id}, ${JSON.stringify(
|
||||
update(current.doc)
|
||||
)}), error: ${JSON.stringify(error)}`
|
||||
);
|
||||
console.error({ caller: 'db.put', _id, type, defaultDoc, error });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user