From: Andrew Dolgov Date: Sun, 13 Aug 2006 04:23:44 +0000 (+0100) Subject: check if moveToPost is defined before parsing n/p hotkeys (2) X-Git-Tag: schema_freeze_for_1.2.2~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=daa4f947f223ea458ccacf6b7e39bc49eb2eb325;p=tt-rss.git check if moveToPost is defined before parsing n/p hotkeys (2) --- diff --git a/functions.js b/functions.js index aec6a82c..8e191c8d 100644 --- a/functions.js +++ b/functions.js @@ -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'); } }