From 71e9f4488bf8b3c8b094da94cb69f0a8f141cdd7 Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Fri, 8 Aug 2014 10:56:00 -0400 Subject: [PATCH] Annotator Tools: Fix major logic bug in code --- common/static/js/vendor/ova/flagging-annotator.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/static/js/vendor/ova/flagging-annotator.js b/common/static/js/vendor/ova/flagging-annotator.js index 6c2a142a53..66f56b80b3 100644 --- a/common/static/js/vendor/ova/flagging-annotator.js +++ b/common/static/js/vendor/ova/flagging-annotator.js @@ -76,8 +76,9 @@ Annotator.Plugin.Flagging = (function(_super) { */ Flagging.prototype.updateField = function(field, annotation) { - // figure out whether annotation is of image or not - var user_email = annotation.media === "image" ? + // figure out whether annotation is of type image or if ova is not defined (meaning it + // it doesn't have a type yet, but it is still an image). + var user_email = (annotation.media === "image" || typeof ova === 'undefined') ? osda.options.optionsAnnotator.permissions.user.id: ova.options.optionsAnnotator.permissions.user.id;