From ee76256bae94a77e0436d3a7940b32433506c68e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 21 Nov 2014 16:50:11 +0000 Subject: [PATCH] only use paste index if editPanel is loaded --- static/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/utils.js b/static/js/utils.js index 293092414..fe2962711 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -446,7 +446,7 @@ pandora.createLinks = function($element) { pandora.api.addClips({ clips: pandora.getClipData(items), edit: target, - index: pandora.$ui.editPanel.getPasteIndex() + index: pandora.$ui.editPanel ? pandora.$ui.editPanel.getPasteIndex() : null }, function(result) { // adding clips creates new ids, so mutate items in history items.splice.apply(items, [0, items.length].concat(pandora.getClipItems(result.data.clips)));