From ea52a2c46fa9fedeef962dbf3c48201f6cf0cdd8 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 4 Aug 2013 11:27:52 +0000 Subject: [PATCH] fix getType test, fix typo --- static/js/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/utils.js b/static/js/utils.js index 6b27e76e8..90697afa8 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -352,7 +352,7 @@ pandora.createLinks = function($element) { if (object.action == 'copy' || object.action == 'paste') { removeItems(object.items, object.targets[0], done); } else if (object.action == 'cut' || object.action == 'delete') { - addItems(object.removedItems, object.targets[0], done); + addItems(object.items, object.targets[0], done); } else if (object.action == 'move') { removeItems(object.items[1], object.targets[1], function() { addItems(object.items[0], object.targets[0], done); @@ -423,7 +423,8 @@ pandora.createLinks = function($element) { } function getType(items) { - return items[0] && Ox.contains(items[0], '/') ? 'clip' : 'item'; + var item = Ox.isArray(items[0]) ? items[0][0] : items[0]; + return Ox.contains(item, '/') ? 'clip' : 'item'; }; function removeItems(items, target, callback) {