Skip to content

Commit

Permalink
fix: fix check for appName and delegateName
Browse files Browse the repository at this point in the history
  • Loading branch information
NSEcho committed Sep 17, 2023
1 parent b3bdedf commit 941d15e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ rpc.exports = {
setup(method, appName, delegateName) {
switch (method) {
case "delegate":
if (delegateName != "" ) {
if (!delegateName) {
delegate = ObjC.Object(ObjC.chooseSync(ObjC.classes[delegateName])[0]);
} else {
delegate = ObjC.Object(ObjC.chooseSync(AppDelegate)[0]);
}
if (appName != "") {
if (!appName) {
app = ObjC.Object(ObjC.chooseSync(ObjC.classes[appName])[0]);
} else {
app = ObjC.Object(ObjC.chooseSync(UIApplication)[0]);
}
break;
case "app":
if (appName != "") {
if (!appName) {
app = ObjC.Object(ObjC.chooseSync(UIApplication)[0]);
} else {
app = ObjC.Object(ObjC.chooseSync(ObjC.classes[appName])[0]);
Expand Down

0 comments on commit 941d15e

Please sign in to comment.