Skip to content

Commit

Permalink
(patch) _forwardItem: sending props to constructor should be faster t…
Browse files Browse the repository at this point in the history
…han assigning after instancing
  • Loading branch information
cristinecula committed Mar 27, 2019
1 parent 5e2d92d commit 641a567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cosmoz-data-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,8 @@
if (Polymer.flush) {
Polymer.flush();
}
const instance = new this._elementCtor({});
Object.assign(instance, { [this.as]: item }, this._getBaseProps(idx));
const props = Object.assign({ [this.as]: item }, this._getBaseProps(idx));
const instance = new this._elementCtor(props);

element.__instance = instance;
element.item = item;
Expand Down

0 comments on commit 641a567

Please sign in to comment.