Fix JS strict warning in overlay.js and error when right-clicking the browser content area before anything is selected in Zotero
This commit is contained in:
parent
de6f35be6b
commit
de4f449c45
|
@ -942,7 +942,7 @@ var ZoteroPane = new function()
|
||||||
function reindexItem() {
|
function reindexItem() {
|
||||||
var items = this.getSelectedItems();
|
var items = this.getSelectedItems();
|
||||||
if (!items) {
|
if (!items) {
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i=0; i<items.length; i++) {
|
for (var i=0; i<items.length; i++) {
|
||||||
|
@ -1610,7 +1610,8 @@ var ZoteroPane = new function()
|
||||||
var showing = false;
|
var showing = false;
|
||||||
if (menuitem){
|
if (menuitem){
|
||||||
var items = ZoteroPane.getSelectedItems();
|
var items = ZoteroPane.getSelectedItems();
|
||||||
if (ZoteroPane.itemsView.selection.count==1 && items[0] && items[0].isNote()
|
if (ZoteroPane.itemsView.selection && ZoteroPane.itemsView.selection.count==1
|
||||||
|
&& items[0] && items[0].isNote()
|
||||||
&& window.gContextMenu.isTextSelected)
|
&& window.gContextMenu.isTextSelected)
|
||||||
{
|
{
|
||||||
menuitem.hidden = false;
|
menuitem.hidden = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user