Skip to content

Commit

Permalink
Merge branch 'master' into createref-support
Browse files Browse the repository at this point in the history
  • Loading branch information
reznord committed Jun 20, 2018
2 parents e1cd4f9 + 8be9c5f commit eae48c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/vdom/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ export function setComponentProps(component, props, renderMode, context, mountAl
if (component._disable) return;
component._disable = true;

if ((component.__ref = props.ref)) delete props.ref;
if ((component.__key = props.key)) delete props.key;
component.__ref = props.ref;
component.__key = props.key;
delete props.ref;
delete props.key;

if (typeof component.constructor.getDerivedStateFromProps === 'undefined') {
if (!component.base || mountAll) {
Expand Down
2 changes: 1 addition & 1 deletion test/browser/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function benchmark(iter, callback) {
for (let i=100; i--; ) noop(), iter();

let count = 2,
time = 500,
time = 1000,
passes = 0,
noops = loop(noop, time),
iterations = 0;
Expand Down

0 comments on commit eae48c1

Please sign in to comment.