From 37f40fcc70cd8df7f417fd3fd96f4b8b2cdd3daf Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Mon, 12 Oct 2020 12:36:58 +0530 Subject: [PATCH] Fix issue with setting dynamic triggers on immutable widget objects (#1137) --- app/client/src/sagas/WidgetOperationSagas.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client/src/sagas/WidgetOperationSagas.tsx b/app/client/src/sagas/WidgetOperationSagas.tsx index c31fd35d58..5e67de0209 100644 --- a/app/client/src/sagas/WidgetOperationSagas.tsx +++ b/app/client/src/sagas/WidgetOperationSagas.tsx @@ -541,7 +541,9 @@ function* updateDynamicTriggers( widget.type, ); if (propertyName in triggerProperties) { - let dynamicTriggers: Record = widget.dynamicTriggers || {}; + let dynamicTriggers: Record = widget.dynamicTriggers + ? { ...widget.dynamicTriggers } + : {}; if (propertyValue && !(propertyName in dynamicTriggers)) { dynamicTriggers[propertyName] = true; }