mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Null-out the padeditor's reference to ace once it has been distroyed.
This enables the guards placed in `padeditor.disable` to work. On `window.unload` the pad's connection would get closed which would lead to the editor becomming disabled. If the editor had already been `disposed` then the call to `disable` would raise the exception: `Uncaught TypeError: Cannot call method 'ace_setProperty' of null`
This commit is contained in:
parent
aeea061f69
commit
f83e619fd9
1 changed files with 1 additions and 0 deletions
|
@ -141,6 +141,7 @@ var padeditor = (function()
|
||||||
if (self.ace)
|
if (self.ace)
|
||||||
{
|
{
|
||||||
self.ace.destroy();
|
self.ace.destroy();
|
||||||
|
self.ace = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
disable: function()
|
disable: function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue