From 9cb2bf1e5cef51e756d83ef4cca3505099bb64e3 Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Mon, 30 Sep 2024 22:53:42 +0200 Subject: [PATCH] Fix undefined decimal type serialization. --- package.json | 2 +- src/Model/Types/DecimalType.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c5ec456..fe9fd71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sharkitek/core", - "version": "2.1.1", + "version": "2.1.2", "description": "Sharkitek core models library.", "keywords": [ "sharkitek", diff --git a/src/Model/Types/DecimalType.ts b/src/Model/Types/DecimalType.ts index 6849999..aa199c5 100644 --- a/src/Model/Types/DecimalType.ts +++ b/src/Model/Types/DecimalType.ts @@ -12,7 +12,7 @@ export class DecimalType extends Type serialize(value: number): string { - return value.toString(); + return value?.toString(); } }