mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-08-19 13:14:00 +00:00
fix processor updating in route signals
This commit is contained in:
@@ -49,6 +49,9 @@ export class RouteListComponent {
|
||||
this.routes.update((routes) => {
|
||||
if (routes) {
|
||||
routes[index].input = route.input;
|
||||
if (route.processors) {
|
||||
routes[index].processors = [...route.processors];
|
||||
}
|
||||
return [...routes];
|
||||
}
|
||||
return routes;
|
||||
|
||||
@@ -114,13 +114,12 @@ export class RouteComponent {
|
||||
const processorTemplate = this.schemaService.getSkeletonForProcessor(processorType);
|
||||
this.route.update((route) => {
|
||||
if (route) {
|
||||
if (!route.processors) {
|
||||
route.processors = [];
|
||||
}
|
||||
route.processors?.push(processorTemplate);
|
||||
const processors = route.processors || [];
|
||||
|
||||
processors.push(processorTemplate);
|
||||
return {
|
||||
...route,
|
||||
processors: [...route.processors],
|
||||
processors: [...processors],
|
||||
};
|
||||
}
|
||||
return route;
|
||||
|
||||
Reference in New Issue
Block a user