Skip to content

Commit

Permalink
edit-menu: Deep copy new layer to lose reference to current layer
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl authored and patrickelectric committed Feb 15, 2023
1 parent ffb51a3 commit 0524dd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/EditMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const loadProfile = (): void => {
const createNewProfile = async (): Promise<void> => {
profileCreationDialogRevealed.value = false
try {
const newProfile = store.saveProfile(newProfileName.value, store.currentProfile.layers)
const newProfile = store.saveProfile(newProfileName.value, JSON.parse(JSON.stringify(store.currentProfile.layers)))
store.loadProfile(newProfile)
selectedProfile.value = store.currentProfile
newProfileName.value = ''
Expand Down

0 comments on commit 0524dd1

Please sign in to comment.