Skip to content

Commit 63c2d40

Browse files
committed
Add safeguard in compileStandardWrapper for a (currently) impossible edge case
1 parent be32d4a commit 63c2d40

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wrapper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ function setupMethods (soljson) {
180180
}
181181

182182
// Try our luck with an ancient compiler
183-
return translateOutput(compileJSON(sources[Object.keys(sources)[0]], isOptimizerEnabled(input)), libraries);
183+
if (compileJSON !== null) {
184+
return translateOutput(compileJSON(sources[Object.keys(sources)[0]], isOptimizerEnabled(input)), libraries);
185+
}
186+
187+
return formatFatalError('Compiler does not support any known interface.');
184188
};
185189

186190
var version;

0 commit comments

Comments
 (0)