0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Koenig - Fixed "set on destroyed object" error

refs https://github.com/TryGhost/Ghost/issues/9623
- the `{{koenig-toolbar}} `didReceiveAttrs` hook was triggering an async action when the component was being destroyed so a guard is needed around the call to `set` in the `_hideToolbar` method
This commit is contained in:
Kevin Ansfield 2018-05-28 16:54:16 +01:00
parent 7846192ac3
commit b0d778a5dc

View file

@ -227,7 +227,9 @@ export default Component.extend({
},
_hideToolbar() {
if (!this.isDestroyed || !this.isDestroying) {
this.set('showToolbar', false);
}
this._lastRange = null;
this._removeMousemoveHandler();
},