From e59a2f12de5c95b63c8e0a40e575151fd014e0ac Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 13 Aug 2006 05:12:33 +0100 Subject: [PATCH] check if moveToPost is defined before parsing n/p hotkeys --- functions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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') { -- 2.39.2