chore: Small refactor

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs
2025-09-04 10:23:13 +02:00
parent 5a62499e95
commit bcf3127fe5

View File

@@ -367,11 +367,7 @@ export class LinearElementEditor {
);
}
const newLinearElementEditor = {
...linearElementEditor,
customLineAngle,
};
// PERF: Avoid state updates if not absolutely necessary
if (
app.state.selectedLinearElement?.customLineAngle === customLineAngle &&
(!suggestedBinding ||
@@ -380,6 +376,11 @@ export class LinearElementEditor {
return null;
}
const newLinearElementEditor = {
...linearElementEditor,
customLineAngle,
};
return {
selectedLinearElement: newLinearElementEditor,
suggestedBinding,