Skip to content

Commit a6b830f

Browse files
committed
Make compileJSON optional
1 parent aed930d commit a6b830f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

wrapper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ function setupMethods (soljson) {
4848
return output;
4949
};
5050

51-
var compileJSON = soljson.cwrap('compileJSON', 'string', ['string', 'number']);
51+
var compileJSON = null;
52+
if ('_compileJSON' in soljson) {
53+
compileJSON = soljson.cwrap('compileJSON', 'string', ['string', 'number']);
54+
}
5255
var compileJSONMulti = null;
5356
if ('_compileJSONMulti' in soljson) {
5457
compileJSONMulti = soljson.cwrap('compileJSONMulti', 'string', ['string', 'number']);

0 commit comments

Comments
 (0)