diff --git a/src/compiler/jsgen.js b/src/compiler/jsgen.js index 95afeba8..db307fd1 100644 --- a/src/compiler/jsgen.js +++ b/src/compiler/jsgen.js @@ -446,7 +446,7 @@ class JSGenerator { return new TypedInput(`${JSON.stringify(node.value)}`, TYPE_UNKNOWN); case 'args.ccw_hat_parameter': - return new TypedInput(`(thread.hatParam ? thread.hatParam['${node.index}']: null)`, TYPE_UNKNOWN); + return new TypedInput(`(thread.hatParam ? thread.hatParam["${sanitize(node.index)}"]: null)`, TYPE_UNKNOWN); case 'addons.call': return new TypedInput(`(${this.descendAddonCall(node)})`, TYPE_UNKNOWN);