use lodash cloneDeep

This commit is contained in:
jb-alvarado 2021-03-23 13:56:14 +01:00
parent 75c5254c18
commit 18de7155fa

View File

@ -284,8 +284,8 @@ export default {
methods: { methods: {
addChannel () { addChannel () {
const config = JSON.parse(JSON.stringify(this.configGui)) const config = this.$_.cloneDeep(this.configGui)
const newConf = JSON.parse(JSON.stringify(this.configGui[this.configGui.length - 1])) const newConf = this.$_.cloneDeep(this.configGui[this.configGui.length - 1])
const playoutConfigPath = newConf.playout_config.match(/.*\//) const playoutConfigPath = newConf.playout_config.match(/.*\//)
const playoutConfigFile = newConf.playout_config.replace(/(.*\/|\.yml)/g, '').split('-') const playoutConfigFile = newConf.playout_config.replace(/(.*\/|\.yml)/g, '').split('-')
@ -319,7 +319,7 @@ export default {
this.showAlert = true this.showAlert = true
}, },
async deleteChannel () { async deleteChannel () {
const config = JSON.parse(JSON.stringify(this.configGui)) const config = this.$_.cloneDeep(this.configGui)
const id = config[this.configID].id const id = config[this.configID].id
if (id === 1) { if (id === 1) {