props: don't update cached props if not dynamic (the old value can be used in old-fashion remove callback)

This commit is contained in:
jean-emmanuel 2018-02-15 09:30:55 +01:00
parent 2402a66a83
commit d9e6d64bf3

View file

@ -363,14 +363,13 @@ class Widget extends EventEmitter {
if (JSON.stringify(oldPropValue) !== JSON.stringify(propValue)) {
this.cachedProps[propName] = propValue
if (this.onPropChanged(propName, options, oldPropValue)) {
reCreate = true
} else {
this.cachedProps[propName] = propValue
changedProps.push(propName)
}