From 153526350de646de08c54b9a714515c7ebab8777 Mon Sep 17 00:00:00 2001 From: pablomendezroyo Date: Wed, 20 Sep 2023 16:39:09 +0200 Subject: [PATCH] fix modifying existing object --- .../system/components/SystemUpdate/SystemUpdateDetails.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/admin-ui/src/pages/system/components/SystemUpdate/SystemUpdateDetails.tsx b/packages/admin-ui/src/pages/system/components/SystemUpdate/SystemUpdateDetails.tsx index cb4a6d867..9c4765878 100644 --- a/packages/admin-ui/src/pages/system/components/SystemUpdate/SystemUpdateDetails.tsx +++ b/packages/admin-ui/src/pages/system/components/SystemUpdate/SystemUpdateDetails.tsx @@ -73,7 +73,10 @@ export function getCoreDeps( // remove the warning on install for the core.dnp.dappnode.eth DNP // Alerts can be added via the conditional update alerts coreDnp.warningOnInstall = ""; - return [coreDnp]; + + // instead create a new object with warningOnInstall removed + // otherwise there will be raised the error: `TypeError: Cannot add property warningOnInstall, object is not extensible` + return [{ ...coreDnp, warningOnInstall: "" }]; } return [];