copy tab data before mutating (#2084)

This commit is contained in:
Piyush Mishra 2020-12-10 14:21:54 +05:30 committed by GitHub
parent 235c58645f
commit 580c261e5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,8 +200,9 @@ const WidgetConfigResponse: WidgetConfigReducerState = {
const tabs = [...widget.tabs];
const newTabs = tabs.map((tab: any) => {
tab.widgetId = generateReactKey();
return tab;
const newTab = { ...tab };
newTab.widgetId = generateReactKey();
return newTab;
});
const updatePropertyMap = [
{