mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
common: Account for string.match returning null.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
41e3db81be
commit
11bec3e6b5
@@ -117,7 +117,7 @@ exports.adjust_mac_shortcuts = function (key_elem_class, require_cmd_style) {
|
|||||||
|
|
||||||
$(key_elem_class).each(function () {
|
$(key_elem_class).each(function () {
|
||||||
let key_text = $(this).text();
|
let key_text = $(this).text();
|
||||||
const keys = key_text.match(/[^\s\+]+/g);
|
const keys = key_text.match(/[^\s\+]+/g) || [];
|
||||||
|
|
||||||
if (key_text.includes('Ctrl') && require_cmd_style) {
|
if (key_text.includes('Ctrl') && require_cmd_style) {
|
||||||
$(this).addClass("mac-cmd-key");
|
$(this).addClass("mac-cmd-key");
|
||||||
|
|||||||
Reference in New Issue
Block a user