check if moveToPost is defined before parsing n/p hotkeys (2)

This commit is contained in:
Andrew Dolgov 2006-08-13 05:23:44 +01:00
parent e59a2f12de
commit daa4f947f2
1 changed files with 2 additions and 2 deletions

View File

@ -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');
}
}