Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3d3b8b

Browse files
authored
fix: Stop multiple buttons from compounding in the workspace action dropdown (coder#3482)
The variadic function on an object doesn't clone the inner array.This was causing the `secondary` property to accumulate more andmore button types as time went on!Fixescoder#3154.
1 parent16c12e9 commitb3d3b8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎site/src/components/WorkspaceActions/WorkspaceActions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
6868
// if an update is available, we make the update button the primary CTA
6969
// and move the former primary CTA to the secondary actions list
7070
constupdatedActions={ ...WorkspaceStateActions[workspaceState]}
71-
updatedActions.secondary.unshift(updatedActions.primary)
71+
updatedActions.secondary=[updatedActions.primary, ...updatedActions.secondary]
7272
updatedActions.primary=ButtonTypesEnum.update
7373

7474
returnupdatedActions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp