diff options
| author | Andrew Dolgov <fox@bah.spb.su> | 2006-08-13 05:24:16 +0100 |
|---|---|---|
| committer | Andrew Dolgov <fox@bah.spb.su> | 2006-08-13 05:24:16 +0100 |
| commit | 746a0d5eb3488200c0b48e86dbc51a118bfae864 (patch) | |
| tree | eb4ce8ba9c369ed7f3ae5e20720fccd5532ce90e | |
| parent | daa4f947f223ea458ccacf6b7e39bc49eb2eb325 (diff) | |
check if moveToPost is defined before parsing n/p hotkeys (3)
| -rw-r--r-- | functions.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions.js b/functions.js index 8e191c8d0..4ab997d80 100644 --- a/functions.js +++ b/functions.js @@ -203,13 +203,13 @@ function hotkey_handler(e) { } if (keycode == 78 || keycode == 40) { // n, down - if (h_ctx.moveToPost != undefined) { + if (typeof h_ctx.moveToPost != 'undefined') { return h_ctx.moveToPost('next'); } } if (keycode == 80 || keycode == 38) { // p, up - if (h_ctx.moveToPost != undefined) { + if (typeof h_ctx.moveToPost != 'undefined') { return h_ctx.moveToPost('prev'); } } |