mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 14:38:46 +00:00
rows: Convert valid_table_names from object to Set.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
aa912ef759
commit
e6dd1911c7
@@ -111,13 +111,13 @@ exports.local_echo_id = function (message_row) {
|
|||||||
return zid;
|
return zid;
|
||||||
};
|
};
|
||||||
|
|
||||||
const valid_table_names = {
|
const valid_table_names = new Set([
|
||||||
zhome: true,
|
"zhome",
|
||||||
zfilt: true,
|
"zfilt",
|
||||||
};
|
]);
|
||||||
|
|
||||||
exports.get_table = function (table_name) {
|
exports.get_table = function (table_name) {
|
||||||
if (!valid_table_names.hasOwnProperty(table_name)) {
|
if (!valid_table_names.has(table_name)) {
|
||||||
return $();
|
return $();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user