From 18de7155fa29993b0076b25a796466069b917cc0 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Tue, 23 Mar 2021 13:56:14 +0100 Subject: [PATCH] use lodash cloneDeep --- pages/configure.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/configure.vue b/pages/configure.vue index e240e630..b868ecfe 100644 --- a/pages/configure.vue +++ b/pages/configure.vue @@ -284,8 +284,8 @@ export default { methods: { addChannel () { - const config = JSON.parse(JSON.stringify(this.configGui)) - const newConf = JSON.parse(JSON.stringify(this.configGui[this.configGui.length - 1])) + const config = this.$_.cloneDeep(this.configGui) + const newConf = this.$_.cloneDeep(this.configGui[this.configGui.length - 1]) const playoutConfigPath = newConf.playout_config.match(/.*\//) const playoutConfigFile = newConf.playout_config.replace(/(.*\/|\.yml)/g, '').split('-') @@ -319,7 +319,7 @@ export default { this.showAlert = true }, async deleteChannel () { - const config = JSON.parse(JSON.stringify(this.configGui)) + const config = this.$_.cloneDeep(this.configGui) const id = config[this.configID].id if (id === 1) {