[bugfix] name is undefined

This commit is contained in:
AloneMonkey 2018-01-12 13:10:13 +08:00
parent bb01b071c5
commit 1f69b9fd9f
1 changed files with 1 additions and 1 deletions

2
app.js
View File

@ -13,7 +13,7 @@ function getbundleid(name){
var result; var result;
for(var index = 0; index < apps.count(); index++){ for(var index = 0; index < apps.count(); index++){
var proxy = apps.objectAtIndex_(index); var proxy = apps.objectAtIndex_(index);
if(proxy.localizedName().toString() == name){ if(proxy.localizedName() && proxy.localizedName().toString() == name){
return proxy.bundleIdentifier().toString(); return proxy.bundleIdentifier().toString();
} }
} }