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
|
@ -141,6 +141,7 @@ var padeditor = (function()
|
|||
if (self.ace)
|
||||
{
|
||||
self.ace.destroy();
|
||||
self.ace = null;
|
||||
}
|
||||
},
|
||||
disable: function()
|
||||
|
|
Loading…
Reference in New Issue