From 81912d7876b136fd19bbdf2dbf9296a9853e9b86 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sat, 7 May 2022 10:14:01 -0500 Subject: [PATCH] Fix defaultMultipliers being changed --- src/BitNode/BitNode.tsx | 2 ++ src/BitNode/BitNodeMultipliers.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BitNode/BitNode.tsx b/src/BitNode/BitNode.tsx index 6b3365a4a..c6af221ab 100644 --- a/src/BitNode/BitNode.tsx +++ b/src/BitNode/BitNode.tsx @@ -504,6 +504,8 @@ export const defaultMultipliers: IBitNodeMultipliers = { WorldDaemonDifficulty: 1, }; +Object.freeze(defaultMultipliers); + export function getBitNodeMultipliers(n: number, lvl: number): IBitNodeMultipliers { const mults = Object.assign({}, defaultMultipliers); switch (n) { diff --git a/src/BitNode/BitNodeMultipliers.ts b/src/BitNode/BitNodeMultipliers.ts index a5d4c7bc7..e9f18a783 100644 --- a/src/BitNode/BitNodeMultipliers.ts +++ b/src/BitNode/BitNodeMultipliers.ts @@ -252,4 +252,4 @@ export interface IBitNodeMultipliers { * The multipliers that are influenced by current Bitnode progression. */ // tslint:disable-next-line:variable-name -export const BitNodeMultipliers = defaultMultipliers; +export const BitNodeMultipliers = Object.assign({}, defaultMultipliers);