bookmarks: don't fabricate a local save when the server rejects it #121
1 changed files with 4 additions and 0 deletions
|
|
@ -111,6 +111,10 @@ function buildStar() {
|
||||||
try {
|
try {
|
||||||
if (existing) await bookmarks.remove(existing.id);
|
if (existing) await bookmarks.remove(existing.id);
|
||||||
else await bookmarks.add(loc.lat, loc.lon, currentLabel());
|
else await bookmarks.add(loc.lat, loc.lon, currentLabel());
|
||||||
|
} catch (e) {
|
||||||
|
// A real server rejection (e.g. the per-user cap) — bookmarks.add() no
|
||||||
|
// longer fakes a local save for this, so say why nothing changed.
|
||||||
|
alert(e.message || "Couldn't save this location.");
|
||||||
} finally {
|
} finally {
|
||||||
btn.disabled = false;
|
btn.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue