Skip to content

Commit

Permalink
Only unwrap arguments when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed May 2, 2017
1 parent 11ec52b commit 12b95ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions lib/constructs/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ Interface.prototype.generateExport = function () {
return false;
},
convert(obj) {
// One day... one day... we'll be able to get rid of this branch...
if (module.exports.isImpl(obj)) {
return obj;
}
if (module.exports.is(obj)) {
return utils.implForWrapper(obj);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/parameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports.generateOverloadConversions = function (ctx, overloads, parentNam
str += `\n
const args = [];
for (let i = 0; i < arguments.length${extraClause}; ++i) {
args[i] = utils.tryImplForWrapper(arguments[i]);
args[i] = arguments[i];
}`;

for (let i = 0; i < typeConversions.length; ++i) {
Expand Down

0 comments on commit 12b95ee

Please sign in to comment.