mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-08-10 17:03:39 +00:00
only add params to module if defined in update
This commit is contained in:
@@ -73,7 +73,9 @@ export class ConfigComponent {
|
||||
if (config && config.modules) {
|
||||
config.modules[index].id = module.id;
|
||||
config.modules[index].type = module.type;
|
||||
config.modules[index].params = module.params;
|
||||
if (module.params !== undefined) {
|
||||
config.modules[index].params = module.params;
|
||||
}
|
||||
return {
|
||||
...config,
|
||||
modules: config.modules,
|
||||
|
||||
@@ -64,7 +64,7 @@ export class ModuleComponent {
|
||||
|
||||
paramsUpdated(params: any) {
|
||||
this.module.update((module) => {
|
||||
if (module !== undefined) {
|
||||
if (module !== undefined && module.params !== undefined) {
|
||||
module.params = params;
|
||||
return {
|
||||
...module,
|
||||
|
||||
Reference in New Issue
Block a user