From c7e463b9e002f22befe2421664a48f1d2b5bbb09 Mon Sep 17 00:00:00 2001 From: Mees Date: Sat, 19 Oct 2024 12:11:02 +0200 Subject: [PATCH] fix format --- src/stores/gameStore.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stores/gameStore.ts b/src/stores/gameStore.ts index e962210..10790c2 100644 --- a/src/stores/gameStore.ts +++ b/src/stores/gameStore.ts @@ -977,6 +977,10 @@ export const useGameStore = defineStore('gameStore', { return scaledNumber.toFixed(toFixed) + suffixes[exponent] } + if (toFixed === 0) { + toFixed = 2 + } + // Use E notation for numbers 100 million and above return value.toExponential(toFixed) },