Fix error when saving via browser context menu when Zotero pane/tab hasn't been opened

This commit is contained in:
Dan Stillman 2011-08-28 22:15:39 +00:00
parent 47ab265532
commit 2e5b87b9e7

View File

@ -667,14 +667,14 @@ var ZoteroPane = new function()
return false;
}
// Currently selected row
if (row === undefined) {
// Make sure currently selected view is editable
if (row === undefined && this.collectionsView.selection) {
row = this.collectionsView.selection.currentIndex;
}
if (!this.canEdit(row)) {
this.displayCannotEditLibraryMessage();
return;
if (!this.canEdit(row)) {
this.displayCannotEditLibraryMessage();
return;
}
}
if (row !== undefined) {
@ -704,8 +704,6 @@ var ZoteroPane = new function()
//set to Info tab
document.getElementById('zotero-view-item').selectedIndex = 0;
this.selectItem(itemID);
// Update most-recently-used list for New Item menu
var mru = Zotero.Prefs.get('newItemTypeMRU');
if (mru) {