From: Andrew Dolgov Date: Sun, 13 Aug 2006 04:12:33 +0000 (+0100) Subject: check if moveToPost is defined before parsing n/p hotkeys X-Git-Tag: schema_freeze_for_1.2.2~19 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e59a2f12de5c95b63c8e0a40e575151fd014e0ac;p=tt-rss.git check if moveToPost is defined before parsing n/p hotkeys --- diff --git a/functions.js b/functions.js index ec129aeb..aec6a82c 100644 --- a/functions.js +++ b/functions.js @@ -203,11 +203,15 @@ function hotkey_handler(e) { } if (keycode == 78 || keycode == 40) { // n, down - return h_ctx.moveToPost('next'); + if (typeof h_ctx.moveToPost != undefined) { + return h_ctx.moveToPost('next'); + } } if (keycode == 80 || keycode == 38) { // p, up - return h_ctx.moveToPost('prev'); + if (typeof h_ctx.moveToPost != undefined) { + return h_ctx.moveToPost('prev'); + } } if (typeof localHotkeyHandler != 'undefined') {