Skip to content

Commit

Permalink
fix modifying existing object
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo committed Sep 20, 2023
1 parent 82ecbcd commit 1535263
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
Expand Down

0 comments on commit 1535263

Please sign in to comment.