[BUGFIX] JS error in editor when switching file

Change-Id: Ie467ad562983738230f5b85954c2dbc64bb2207d
Fixes: #63052
Reviewed-on: http://review.typo3.org/34317
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>