double check

This commit is contained in:
j 2020-09-25 12:49:26 +02:00
parent 09f9580e1e
commit 03e85c6eef

View file

@ -240,7 +240,7 @@ pandora.ui.editor = function(data) {
var id = result.data.id, var id = result.data.id,
pending = queue[id]; pending = queue[id];
delete queue[id]; delete queue[id];
pending.length && Ox.serialForEach(pending, function(edit, index, array, callback) { pending && pending.length && Ox.serialForEach(pending, function(edit, index, array, callback) {
edit.id = id edit.id = id
Ox.Log('', 'process pending editAnnotation request', id, edit); Ox.Log('', 'process pending editAnnotation request', id, edit);
pandora.api.editAnnotation(edit, function(result) { pandora.api.editAnnotation(edit, function(result) {
@ -261,7 +261,7 @@ pandora.ui.editor = function(data) {
callback(result); callback(result);
var pending = queue[edit.id]; var pending = queue[edit.id];
delete queue[edit.id]; delete queue[edit.id];
pending.length && Ox.serialForEach(pending, function(edit, index, array, cb) { pending && pending.length && Ox.serialForEach(pending, function(edit, index, array, cb) {
Ox.Log('', 'process pending editAnnotation request', edit.id, edit); Ox.Log('', 'process pending editAnnotation request', edit.id, edit);
pandora.api.editAnnotation(edit, function(result) { pandora.api.editAnnotation(edit, function(result) {
callback(result); callback(result);