Skip to content

Commit 68b8428

Browse files
committed
fix: update overlay widget settings effect modifying selected config object in memory
#3383
1 parent 1dba483 commit 68b8428

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/effects/builtin/overlay-widgets/update-overlay-widget-settings.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ const model: EffectType<{
178178
$scope.typeHasSettings = false;
179179

180180
function loadSelectedConfig(id: string) {
181-
$scope.selectedConfig = overlayWidgetsService.getOverlayWidgetConfig(id);
181+
const foundConfig = overlayWidgetsService.getOverlayWidgetConfig(id);
182+
// @ts-ignore
183+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
184+
$scope.selectedConfig = foundConfig ? angular.copy(foundConfig) : null;
182185
if ($scope.selectedConfig == null) {
183186
$scope.selectedType = null;
184187
$scope.settingsSchema = [];

0 commit comments

Comments
 (0)