mirror of https://github.com/zulip/zulip.git
rows: Convert valid_table_names from object to Set.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
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 $();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue