107311 - add null check
r=jst, sr=sspitzer git-svn-id: svn://10.0.0.236/trunk@106656 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -520,7 +520,8 @@ nsContextMenu.prototype = {
|
||||
// Show/hide one item (specified via name or the item element itself).
|
||||
showItem : function ( itemOrId, show ) {
|
||||
var item = itemOrId.constructor == String ? document.getElementById(itemOrId) : itemOrId;
|
||||
item.hidden = !show;
|
||||
if (item)
|
||||
item.hidden = !show;
|
||||
},
|
||||
// Set given attribute of specified context-menu item. If the
|
||||
// value is null, then it removes the attribute (which works
|
||||
|
||||
Reference in New Issue
Block a user