Fix js error on MODx.Console.close()

bugfix:  modx.console, js error on close

(cherry picked from commit 06e1b1ffa17afe83c93bd289c3b1dffe9d193f4e)