Skip to content

Commit b2130fc

Browse files
committed
Simplify license() in wrapper
1 parent 3cfcdd0 commit b2130fc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

wrapper.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,16 @@ function setupMethods (soljson) {
187187
return translate.versionToSemver(version());
188188
};
189189

190-
var license = function () {
191-
// return undefined
192-
};
193-
190+
var license;
194191
if ('_solidity_license' in soljson) {
195192
license = soljson.cwrap('solidity_license', 'string', []);
196193
} else if ('_license' in soljson) {
197194
license = soljson.cwrap('license', 'string', []);
195+
} else {
196+
// pre 0.4.14
197+
license = function () {
198+
// return undefined
199+
};
198200
}
199201

200202
return {

0 commit comments

Comments
 (0)