commit 4cd1dc039c8416b3b4566eb4a6be1922dce1f447
parent e026b1f88668514e955690b8119ba3c9170f4b39
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 24 Feb 2011 04:28:17 +0000
fix some issues when attempting to perform an action on multiple items simultaneously
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git 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) {