fix bugs on device menu

This commit is contained in:
Minun 2020-09-28 16:41:59 +08:00
parent 038349048b
commit 7c7f4e8da9

View File

@ -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();