mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 05:58:25 +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;
|
||||
};
|
||||
|
||||
const valid_table_names = {
|
||||
zhome: true,
|
||||
zfilt: true,
|
||||
};
|
||||
const valid_table_names = new Set([
|
||||
"zhome",
|
||||
"zfilt",
|
||||
]);
|
||||
|
||||
exports.get_table = function (table_name) {
|
||||
if (!valid_table_names.hasOwnProperty(table_name)) {
|
||||
if (!valid_table_names.has(table_name)) {
|
||||
return $();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user