From 1f69b9fd9f811c6daa31020fe3534befe197b2ab Mon Sep 17 00:00:00 2001 From: AloneMonkey Date: Fri, 12 Jan 2018 13:10:13 +0800 Subject: [PATCH] [bugfix] name is undefined --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index ce12626..699a1c9 100644 --- a/app.js +++ b/app.js @@ -13,7 +13,7 @@ function getbundleid(name){ var result; for(var index = 0; index < apps.count(); index++){ var proxy = apps.objectAtIndex_(index); - if(proxy.localizedName().toString() == name){ + if(proxy.localizedName() && proxy.localizedName().toString() == name){ return proxy.bundleIdentifier().toString(); } }