]> git.wh0rd.org Git - tt-rss.git/commitdiff
check if moveToPost is defined before parsing n/p hotkeys (3)
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 13 Aug 2006 04:24:16 +0000 (05:24 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 13 Aug 2006 04:24:16 +0000 (05:24 +0100)
functions.js

index 8e191c8d0e7589734b1c50bc0469b2ca0930196f..4ab997d80b74af77c28ab93e376f6fd98019797d 100644 (file)
@@ -203,13 +203,13 @@ function hotkey_handler(e) {
                }
 
                if (keycode == 78 || keycode == 40) { // n, down
-                       if (h_ctx.moveToPost != undefined) {
+                       if (typeof h_ctx.moveToPost != 'undefined') {
                                return h_ctx.moveToPost('next');
                        }
                }
        
                if (keycode == 80 || keycode == 38) { // p, up
-                       if (h_ctx.moveToPost != undefined) {
+                       if (typeof h_ctx.moveToPost != 'undefined') {
                                return h_ctx.moveToPost('prev');
                        }
                }