From 03e85c6eeff64a2de37ce7fffe87c8697999709d Mon Sep 17 00:00:00 2001 From: j Date: Fri, 25 Sep 2020 12:49:26 +0200 Subject: [PATCH] double check --- static/js/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/editor.js b/static/js/editor.js index 8cd460a5..28d3b5ba 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -240,7 +240,7 @@ pandora.ui.editor = function(data) { var id = result.data.id, pending = 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 Ox.Log('', 'process pending editAnnotation request', id, edit); pandora.api.editAnnotation(edit, function(result) { @@ -261,7 +261,7 @@ pandora.ui.editor = function(data) { callback(result); var pending = 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); pandora.api.editAnnotation(edit, function(result) { callback(result);