[BUGFIX] Fix interaction with versions on "All workspaces" tab
[Packages/TYPO3.CMS.git] / typo3 / sysext / workspaces / Classes / Service / WorkspaceService.php
index 8c8df33..b16d20b 100644 (file)
@@ -76,15 +76,11 @@ class WorkspaceService implements SingletonInterface
         // Avoid invalid workspace settings
         if ($activeId !== null && $activeId !== self::SELECT_ALL_WORKSPACES) {
             $availableWorkspaces = $this->getAvailableWorkspaces();
-            if (!isset($availableWorkspaces[$activeId])) {
-                $activeId = null;
+            if (isset($availableWorkspaces[$activeId])) {
+                $workspaceId = $activeId;
             }
         }
 
-        if ($activeId !== null) {
-            $workspaceId = $activeId;
-        }
-
         return $workspaceId;
     }