Skip to content

Commit cfe1713

Browse files
committed
Check compiler version once in the wrapper
1 parent 980275c commit cfe1713

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
@@ -17,6 +17,8 @@ function setupMethods (soljson) {
1717
return translate.versionToSemver(version());
1818
};
1919

20+
var isVersion6 = semver.gt(versionToSemver(), '0.5.99');
21+
2022
var license;
2123
if ('_solidity_license' in soljson) {
2224
license = soljson.cwrap('solidity_license', 'string', []);
@@ -80,7 +82,7 @@ function setupMethods (soljson) {
8082
}
8183

8284
var singleCallback;
83-
if (semver.gt(versionToSemver(), '0.5.99')) {
85+
if (isVersion6) {
8486
// After 0.6.x multiple kind of callbacks are supported.
8587
var smtSolverCallback = callbacks.smtSolver;
8688
if (smtSolverCallback === undefined) {

0 commit comments

Comments
 (0)