liczbyslowniepopolsku 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "liczbyslowniepopolsku",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Zamien liczby na zapis slowny",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -6,7 +6,7 @@ import {
6
6
  jednosci,
7
7
  } from "./odmianadziesiatek.js";
8
8
  export function groszeSlownie(liczba) {
9
- const licznik = liczba?.toFixed(2);
9
+ const licznik = liczba != null ? liczba.toFixed(2) : null;
10
10
  let [zloteRaw, groszeRaw] = licznik.toString().split(".");
11
11
  let zlote = parseInt(zloteRaw);
12
12
  let grosze = parseInt(groszeRaw || "0");