We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c65a385 commit bfc3974Copy full SHA for bfc3974
src/compiler/irgen.js
@@ -150,6 +150,14 @@ class ScriptTreeGenerator {
150
createConstantInput (constant, preserveStrings = false) {
151
if (constant === null) throw new Error('IR: Constant cannot have a null value.');
152
153
+ if (typeof constant === 'object') {
154
+ if (Array.isArray(constant)) {
155
+ return new IntermediateInput(InputOpcode.CONSTANT, InputType.ARRAY, {value: constant});
156
+ } else {
157
+ return new IntermediateInput(InputOpcode.CONSTANT, InputType.OBJECT, {value: constant});
158
+ }
159
160
+
161
constant += '';
162
const numConstant = +constant;
163
const preserve = preserveStrings && this.namesOfCostumesAndSounds.has(constant);
0 commit comments