[BUGFIX] JavaScript error when switching to workspace

Fix a JS error if switching workspaces in toolbar item
if a backend module without pagetree is currently shown.

Resolves: #63492
Releases: master
Change-Id: I65cbc4979bad4b0b3dcee94b72ffdebc9d8b9aff
Reviewed-on: http://review.typo3.org/34889
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>