Skip to content

Commit 81a02e1

Browse files
committed
Support compileJSON missing in compile
1 parent 520d0ae commit 81a02e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wrapper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ function setupMethods (soljson) {
8585
result = compileJSONCallback(JSON.stringify(input), optimise, readCallback);
8686
} else if (typeof input !== 'string' && compileJSONMulti !== null) {
8787
result = compileJSONMulti(JSON.stringify(input), optimise);
88-
} else {
88+
} else if (compileJSON !== null) {
8989
result = compileJSON(input, optimise);
90+
} else {
91+
return { errors: 'No suitable compiler interface found.' };
9092
}
9193
return JSON.parse(result);
9294
};

0 commit comments

Comments
 (0)