stringify not actually needed just compare obj refs
This commit is contained in:
parent
c534f973a1
commit
3b55c98dde
@ -249,7 +249,7 @@ class InstanceConstructs extends preact.Component {
|
||||
if (newProps.tutorial !== this.props.tutorial) return true;
|
||||
if (newProps.navInstance !== this.props.navInstance) return true;
|
||||
// JSON or Array objects
|
||||
if (JSON.stringify(newProps.player) !== JSON.stringify(this.props.player)) return true;
|
||||
if (newProps.player !== this.props.player) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -107,8 +107,8 @@ class Vbox extends preact.Component {
|
||||
// Don't bother if info changes during tutorial
|
||||
if (!newProps.tutorial && newProps.info !== this.props.info) return true;
|
||||
// JSON or Array objects
|
||||
if (JSON.stringify(newProps.vboxSelected) !== JSON.stringify(this.props.vboxSelected)) return true;
|
||||
if (JSON.stringify(newProps.player) !== JSON.stringify(this.props.player)) return true;
|
||||
if (newProps.vboxSelected !== this.props.vboxSelected) return true;
|
||||
if (newProps.player !== this.props.player) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user