mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 04:43:58 +00:00
Replace 'in' with .hasOwnProperty
(imported from commit 209aef184f0a6117d1c14e755e7b916a866b8702)
This commit is contained in:
@@ -33,7 +33,7 @@ function simulate_keypress(keycode) {
|
||||
|
||||
function process_hotkey(code) {
|
||||
var next_zephyr, window_to_scroll;
|
||||
if (code in directional_hotkeys) {
|
||||
if (directional_hotkeys.hasOwnProperty(code)) {
|
||||
next_zephyr = directional_hotkeys[code](selected_zephyr);
|
||||
if (next_zephyr.length !== 0) {
|
||||
select_zephyr(next_zephyr, true);
|
||||
@@ -95,7 +95,7 @@ var goto_hotkeys = {
|
||||
};
|
||||
|
||||
function process_goto_hotkey(code) {
|
||||
if (code in goto_hotkeys)
|
||||
if (goto_hotkeys.hasOwnProperty(code))
|
||||
goto_hotkeys[code]();
|
||||
|
||||
/* Always return to the initial hotkey mode, even
|
||||
|
||||
@@ -400,7 +400,7 @@ function add_messages(data) {
|
||||
|
||||
// If we received the initially selected message, select it on the client side,
|
||||
// but not if the user has already selected another one during load.
|
||||
if ((selected_zephyr_id === -1) && (initial_pointer in zephyr_dict)) {
|
||||
if ((selected_zephyr_id === -1) && (zephyr_dict.hasOwnProperty(initial_pointer))) {
|
||||
select_and_show_by_id(initial_pointer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user