diff --git a/src/views/ASFConfig.vue b/src/views/ASFConfig.vue index 30f7c9c7f..67dbad441 100644 --- a/src/views/ASFConfig.vue +++ b/src/views/ASFConfig.vue @@ -100,8 +100,13 @@ // if we got routed to asf-config with params, we propably // came from PasswordHash.vue and want to set ipc data from params if (Object.keys(this.$route.params).length !== 0) { - this.model.IPCPassword = this.$route.params?.ipcPassword; - this.model.IPCPasswordFormat = this.$route.params?.ipcPasswordFormat; + // only set the values if they exist in the params + if (typeof this.$route.params.ipcPassword !== 'undefined') { + this.model.IPCPassword = this.$route.params.ipcPassword; + } + if (typeof this.$route.params.ipcPasswordFormat !== 'undefined') { + this.model.IPCPasswordFormat = this.$route.params.ipcPasswordFormat; + } } const extendedFields = { diff --git a/src/views/modals/BotConfig.vue b/src/views/modals/BotConfig.vue index b391d310d..e4cdb1643 100644 --- a/src/views/modals/BotConfig.vue +++ b/src/views/modals/BotConfig.vue @@ -102,8 +102,13 @@ // if we got routed to bot-config with params, we propably // came from PasswordEncrypt.vue and want to set password data from params if (Object.keys(this.$route.params).length !== 0) { - this.model.SteamPassword = this.$route.params?.steamPassword; - this.model.PasswordFormat = this.$route.params?.passwordFormat; + // only set the values if they exist in the params + if (typeof this.$route.params.steamPassword !== 'undefined') { + this.model.SteamPassword = this.$route.params.steamPassword; + } + if (typeof this.$route.params.passwordFormat !== 'undefined') { + this.model.PasswordFormat = this.$route.params.passwordFormat; + } } const extendedFields = {