fix(client): fix lint issues in scripts (#8621)

This commit is contained in:
Andreas Nedbal
2022-05-07 07:19:15 +02:00
committed by GitHub
parent ad860905c6
commit a975a0971c
17 changed files with 75 additions and 85 deletions

View File

@@ -85,7 +85,7 @@ export class Hpml {
public eval() {
try {
this.vars.value = this.evaluateVars();
} catch (e) {
} catch (err) {
//this.onError(e);
}
}
@@ -103,7 +103,7 @@ export class Hpml {
public callAiScript(fn: string) {
try {
if (this.aiscript) this.aiscript.execFn(this.aiscript.scope.get(fn), []);
} catch (e) {}
} catch (err) {}
}
@autobind
@@ -185,7 +185,7 @@ export class Hpml {
if (this.aiscript) {
try {
return utils.valToJs(this.aiscript.scope.get(expr.value));
} catch (e) {
} catch (err) {
return null;
}
} else {
@@ -194,7 +194,7 @@ export class Hpml {
}
// Define user function
if (expr.type == 'fn') {
if (expr.type === 'fn') {
return {
slots: expr.value.slots.map(x => x.name),
exec: (slotArg: Record<string, any>) => {