Skip to content

Commit fcc0c8f

Browse files
refactor: address pr comments.
1 parent 4a94d0a commit fcc0c8f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • src/modules/workspace/workspaces-drawer

src/modules/workspace/workspaces-drawer/drawer.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,12 @@ export const createWorkspacesDrawer = ({
243243
placeholder.selected = !filteredEntries.some(entry => entry.id === selectedId)
244244
selectInput.append(placeholder)
245245

246+
const activeWorkspaceId =
247+
typeof getActiveWorkspaceId === 'function' ? toSafeText(getActiveWorkspaceId()) : ''
248+
246249
for (const entry of filteredEntries) {
247250
const option = document.createElement('option')
248251
option.value = toSafeText(entry.id)
249-
const activeWorkspaceId =
250-
typeof getActiveWorkspaceId === 'function'
251-
? toSafeText(getActiveWorkspaceId())
252-
: ''
253252
const activeWorkspaceDisplayLabel =
254253
option.value &&
255254
option.value === activeWorkspaceId &&

0 commit comments

Comments
 (0)