From 4cd1dc039c8416b3b4566eb4a6be1922dce1f447 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 24 Feb 2011 04:28:17 +0000 Subject: [PATCH] fix some issues when attempting to perform an action on multiple items simultaneously --- chrome/content/zotero/locateMenu.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/locateMenu.js b/chrome/content/zotero/locateMenu.js index 959a5be8bb..e23945caac 100644 --- a/chrome/content/zotero/locateMenu.js +++ b/chrome/content/zotero/locateMenu.js @@ -275,8 +275,10 @@ var Zotero_LocateMenu = new function() { var postDatas = []; for each(var item in selectedItems) { var submission = selectedEngine.getItemSubmission(item); - urls.push(submission.uri.spec); - postDatas.push(submission.postData); + if(submission) { + urls.push(submission.uri.spec); + postDatas.push(submission.postData); + } } Zotero.debug("Loading using "+selectedEngine.name); @@ -346,7 +348,8 @@ var Zotero_LocateMenu = new function() { this.canHandleItem = function(item) _getURL(item) !== false; this.handleItems = function(items, event) { - ZoteroPane.loadURI([_getURL(item) for each(item in items)], event); + var urls = [_getURL(item) for each(item in items)]; + ZoteroPane.loadURI([url for each(url in urls) if(url)], event); } function _getURL(item) {