[Pkg-mozext-commits] [nosquint] 36/47: Test if menuitem command property exists before examining

David Prévot taffit at moszumanska.debian.org
Tue Apr 28 01:41:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 2.1.6
in repository nosquint.

commit 718e3181b60b7a17f252b699ae44a3a9caab6fb6
Author: Jason Tackaberry <tack at urandom.ca>
Date:   Wed Jan 25 20:06:44 2012 -0500

    Test if menuitem command property exists before examining
    
    Fixes "reference to undefined property" warning.
---
 src/content/browser.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/content/browser.js b/src/content/browser.js
index 7a6b1f1..e3e0853 100644
--- a/src/content/browser.js
+++ b/src/content/browser.js
@@ -239,8 +239,8 @@ NoSquint.browser = NoSquint.ns(function() { with (NoSquint) {
             for (let [i, child] in enumerate(popup.childNodes)) {
                 if (child.id == 'toggle_zoom')
                     child.hidden = true;
-                if (child.nodeName != 'menuitem' || (child.command != 'cmd_fullZoomEnlarge' && 
-                    child.command != 'cmd_fullZoomReduce'))
+                if (child.nodeName != 'menuitem' || child.command === undefined ||
+                    (child.command != 'cmd_fullZoomEnlarge' && child.command != 'cmd_fullZoomReduce'))
                     continue;
 
                 var icon = document.defaultView.getComputedStyle(child, null).getPropertyValue('list-style-image');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nosquint.git



More information about the Pkg-mozext-commits mailing list