diff options
Diffstat (limited to 'src/client/util/Scripting.ts')
-rw-r--r-- | src/client/util/Scripting.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/Scripting.ts b/src/client/util/Scripting.ts index 7c0649a6a..bf9b8266f 100644 --- a/src/client/util/Scripting.ts +++ b/src/client/util/Scripting.ts @@ -43,7 +43,7 @@ export interface CompileError { export type CompiledScript = CompileSuccess | CompileError; function Run(script: string | undefined, customParams: string[], diagnostics: any[]): CompiledScript { - const errors = diagnostics.some(diag => diag.category == ts.DiagnosticCategory.Error); + const errors = diagnostics.some(diag => diag.category === ts.DiagnosticCategory.Error); if (errors || !script) { return { compiled: false, errors: diagnostics }; } @@ -60,7 +60,7 @@ function Run(script: string | undefined, customParams: string[], diagnostics: an } argsArray.push(args[name]); } - let thisParam = args["this"]; + let thisParam = args.this; try { const result = compiledFunction.apply(thisParam, params).apply(thisParam, argsArray); return { success: true, result }; @@ -160,9 +160,9 @@ export function OrLiteralType(returnType: string): string { } export function ToField(data: any): Opt<Field> { - if (typeof data == "string") { + if (typeof data === "string") { return new TextField(data); - } else if (typeof data == "number") { + } else if (typeof data === "number") { return new NumberField(data); } return undefined; |