Skip to content

Commit

Permalink
Fix regression in 4.6.2 related to recycled component DOM not being t…
Browse files Browse the repository at this point in the history
…reated as first render.
  • Loading branch information
developit committed Apr 19, 2016
1 parent cc6f10f commit a4ca187
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Component(props, context) {
/** @private */
this._dirty = this._disableRendering = false;
/** @public */
this.prevState = this.prevProps = this.prevContext = this.base = this._parentComponent = this._component = this.__ref = this.__key = this._linkedStates = this._renderCallbacks = null;
this.prevState = this.prevProps = this.prevContext = this.base = this.nextBase = this._parentComponent = this._component = this.__ref = this.__key = this._linkedStates = this._renderCallbacks = null;
/** @public */
this.context = context || {};
/** @type {object} */
Expand Down
2 changes: 1 addition & 1 deletion src/vdom/component-recycler.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function createComponent(ctor, props, context) {
if (c.constructor===ctor) {
list.splice(i, 1);
let inst = new ctor(props, context);
inst.base = c.base;
inst.nextBase = c.base;
return inst;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/vdom/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function renderComponent(component, opts) {
base = inst.base;
}
else {
let cbase = component.base;
let cbase = component.base || component.nextBase;

// destroy high order component link
toUnmount = component._component;
Expand Down

0 comments on commit a4ca187

Please sign in to comment.