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

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