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

Commit eb5f3b7

Browse files
committed
Optimize wrap
1 parent 1aa3c96 commit eb5f3b7

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/wrappers.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,8 @@ var ShadowDOMPolyfill = {};
238238

239239
assert(isNative(impl));
240240
var wrapper = wrapperTable.get(impl);
241-
if (!wrapper) {
242-
var wrapperConstructor = getWrapperConstructor(impl);
243-
wrapper = new wrapperConstructor(impl);
244-
wrapperTable.set(impl, wrapper);
245-
}
241+
if (!wrapper)
242+
wrapperTable.set(impl, wrapper = new (getWrapperConstructor(impl))(impl));
246243
return wrapper;
247244
}
248245

0 commit comments

Comments
 (0)