mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 15:05:32 +00:00
Remove from inflight cache before doing anything in done
This commit is contained in:
@@ -933,6 +933,8 @@ export default {
|
||||
|
||||
|
||||
function done(err, xml) {
|
||||
delete _noteCache.inflightPost[note.id];
|
||||
|
||||
if (err) {
|
||||
// 400 Bad Request, 401 Unauthorized, 403 Forbidden..
|
||||
if (err.status === 400 || err.status === 401 || err.status === 403) {
|
||||
@@ -944,8 +946,6 @@ export default {
|
||||
return callback({ message: 'Connection Switched', status: -1 });
|
||||
}
|
||||
|
||||
delete _noteCache.inflightPost[note.id];
|
||||
|
||||
if (xml) { // we get the updated note back, remove from caches and reparse..
|
||||
var item = { minX: note.loc[0], minY: note.loc[1], maxX: note.loc[0], maxY: note.loc[1], data: note };
|
||||
_noteCache.rtree.remove(item, function isEql(a, b) { return a.data.id === b.data.id; });
|
||||
|
||||
Reference in New Issue
Block a user