fix some issues when attempting to perform an action on multiple items simultaneously

This commit is contained in:
Simon Kornblith 2011-02-24 04:28:17 +00:00
parent e026b1f886
commit 4cd1dc039c

View file

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