only use paste index if editPanel is loaded

This commit is contained in:
j 2014-11-21 16:50:11 +00:00
parent a8b2812562
commit ee76256bae

View file

@ -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)));