mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-08 21:15:18 +09:00
Keep the label from old instance (#1215)
Fixes https://github.com/webstudio-is/webstudio-builder/issues/1214 ## Description We ended up removing instance labels when sorting instances, is there more situations like this? ## Steps for reproduction 1. name instance 2. sort it in navigator or on canvas ## Code Review - [ ] hi @TrySound , I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
This commit is contained in:
1 parent
d6811f8dbd
commit
276b19a30d
1 file changed
+1
@@ -75,6 +75,7 @@ export const patchInstancesMutable = (
|
||||
type: "instance",
|
||||
id: oldInstance.id,
|
||||
component: oldInstance.component,
|
||||
label: oldInstance.label,
|
||||
children: oldInstance.children.map((child) => {
|
||||
if (child.type === "text") {
|
||||
return child;
|
||||
|
||||
Reference in new issue
Block a user