Merge pull request #175 from jblyberg/polyfill-fix
fix "TypeError: process.off is not a function" with bundlers
This commit is contained in:
commit
93dfcf7f72
@ -399,7 +399,7 @@ export class WebsocketProvider extends Observable {
|
|||||||
}
|
}
|
||||||
clearInterval(this._checkInterval)
|
clearInterval(this._checkInterval)
|
||||||
this.disconnect()
|
this.disconnect()
|
||||||
if (typeof process !== 'undefined') {
|
if (env.isNode && typeof process !== 'undefined') {
|
||||||
process.off('exit', this._exitHandler)
|
process.off('exit', this._exitHandler)
|
||||||
}
|
}
|
||||||
this.awareness.off('update', this._awarenessUpdateHandler)
|
this.awareness.off('update', this._awarenessUpdateHandler)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user