Open fedotxxl opened 2 years ago
In this case, h1 state will be read from localStorage, differ from JSON persisted state and onChange callback triggered. The problem is that view is not ready and getting value will result to Cannot read properties of undefined (reading 'state')
Cannot read properties of undefined (reading 'state')
Solution add this.view check?
handleChange = () => { if (!this.props.onChange || !this.view) return; this.props.onChange(() => { return this.value(); }); };
I am getting the same error occasionally. And yes, it looks like it has something to do with h1 getting collapsed.
BR, Carsten
In this case, h1 state will be read from localStorage, differ from JSON persisted state and onChange callback triggered. The problem is that view is not ready and getting value will result to
Cannot read properties of undefined (reading 'state')
Solution add this.view check?