From 1db385c8b4e58e4be9302aa13a8ae9a5682904c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frying=E2=98=86Pan?= Date: Tue, 26 Mar 2024 16:53:48 -0400 Subject: [PATCH] replace all spaces in group/track names and not just the first one --- src/components/Editor/Modals/CreateGroup.vue | 2 +- src/components/Editor/Modals/CreateTrack.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Editor/Modals/CreateGroup.vue b/src/components/Editor/Modals/CreateGroup.vue index 2d37021e..2ef9a200 100644 --- a/src/components/Editor/Modals/CreateGroup.vue +++ b/src/components/Editor/Modals/CreateGroup.vue @@ -66,7 +66,7 @@ export default { }, methods: { updateGroupName(event) { - this.group.name = event.target.value.toLowerCase().replace(' ', '-'); + this.group.name = event.target.value.toLowerCase().replace(/ /g, '-'); }, addGroup() { diff --git a/src/components/Editor/Modals/CreateTrack.vue b/src/components/Editor/Modals/CreateTrack.vue index b25ba8dc..acb5f674 100644 --- a/src/components/Editor/Modals/CreateTrack.vue +++ b/src/components/Editor/Modals/CreateTrack.vue @@ -109,7 +109,7 @@ export default { methods: { updateTrackName(event) { - this.track.id = event.target.value.toLowerCase().replace(' ', '-'); + this.track.id = event.target.value.toLowerCase().replace(/ /g, '-'); }, addTrack() {