From 7c7f4e8da93a27d38e493f03c883b68a524ac350 Mon Sep 17 00:00:00 2001 From: Minun Date: Mon, 28 Sep 2020 16:41:59 +0800 Subject: [PATCH] fix bugs on device menu --- patch/nw-menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patch/nw-menu.js b/patch/nw-menu.js index eacbd6a..52ff3b0 100644 --- a/patch/nw-menu.js +++ b/patch/nw-menu.js @@ -14,7 +14,7 @@ nw.MenuItem = function MenuItem(options) { delete options.shortcutName; delete options.shouldEnabled; - if (options.label) { + if (options.label && (typeof options.label === "string")) { if (options.label.indexOf("[") !== -1) { let rest = options.label.split("[").slice(1).join("[").trim();