forked from 0x2620/pandora
only use paste index if editPanel is loaded
This commit is contained in:
parent
a8b2812562
commit
ee76256bae
1 changed files with 1 additions and 1 deletions
|
@ -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)));
|
||||
|
|
Loading…
Reference in a new issue