fix(editor): prevent duplicate lasso toolbar item (#11286)

This commit is contained in:
Praneeth Kodumagulla
2026-05-06 23:10:50 +02:00
committed by GitHub
parent d992c10bc1
commit b2b2815954
2 changed files with 30 additions and 7 deletions
+3 -6
View File
@@ -119,15 +119,12 @@ export const SHAPES = [
export const getToolbarTools = (app: AppClassProperties) => {
return app.state.preferredSelectionTool.type === "lasso"
? ([
SHAPES[0],
{
...SHAPES[1],
value: "lasso",
icon: SelectionIcon,
key: KEYS.V,
numericKey: KEYS["1"],
fillable: true,
toolbar: true,
},
...SHAPES.slice(1),
...SHAPES.slice(2),
] as const)
: SHAPES;
};