fix DomBinding destroy

This commit is contained in:
Kevin Jahns 2018-05-18 02:01:53 +02:00
parent 684d38d6c8
commit dbda07424b

View File

@ -121,12 +121,11 @@ export default class DomBinding extends Binding {
destroy () {
this.domToType = null
this.typeToDom = null
this.type.unobserve(this._typeObserver)
this.type.unobserveDeep(this._typeObserver)
this._mutationObserver.disconnect()
const y = this.type._y
y.off('beforeTransaction', this._beforeTransactionHandler)
y.off('beforeObserverCalls', this._beforeObserverCallsHandler)
y.off('afterObserverCalls', this._afterObserverCallsHandler)
y.off('afterTransaction', this._afterTransactionHandler)
super.destroy()
}