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:
Chad Weider 2012-01-28 17:25:24 -08:00
parent aeea061f69
commit f83e619fd9
1 changed files with 1 additions and 0 deletions

View File

@ -141,6 +141,7 @@ var padeditor = (function()
if (self.ace)
{
self.ace.destroy();
self.ace = null;
}
},
disable: function()