diff options
author | Andrew Dolgov <[email protected]> | 2006-08-13 05:12:33 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-08-13 05:12:33 +0100 |
commit | e59a2f12de5c95b63c8e0a40e575151fd014e0ac (patch) | |
tree | 0410aadb0dcc78eb0edc788d4c1e3449689d567e /functions.js | |
parent | b31c23117aca8b3a719d70e00dbc318465563a33 (diff) |
check if moveToPost is defined before parsing n/p hotkeys
Diffstat (limited to 'functions.js')
-rw-r--r-- | functions.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/functions.js b/functions.js index ec129aeb1..aec6a82c0 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') { |