Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Optimize wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
arv committed Aug 27, 2013
1 parent 1aa3c96 commit eb5f3b7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,8 @@ var ShadowDOMPolyfill = {};

assert(isNative(impl));
var wrapper = wrapperTable.get(impl);
if (!wrapper) {
var wrapperConstructor = getWrapperConstructor(impl);
wrapper = new wrapperConstructor(impl);
wrapperTable.set(impl, wrapper);
}
if (!wrapper)
wrapperTable.set(impl, wrapper = new (getWrapperConstructor(impl))(impl));
return wrapper;
}

Expand Down

0 comments on commit eb5f3b7

Please sign in to comment.