From 3e1bbb75bf50ce8b6fdfe22f5b85e8e7aec70d0f Mon Sep 17 00:00:00 2001 From: Stephan de Wit Date: Wed, 17 Apr 2024 15:01:47 +0200 Subject: [PATCH] converters / datetime - fix object check Object.is() checks equality between two parameters, not whether the variable is an object, better to use the built-in moment method for this. --- src/public.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public.js b/src/public.js index 7015126..02256f2 100644 --- a/src/public.js +++ b/src/public.js @@ -264,7 +264,7 @@ Grid.defaults = { return value ? moment(parseInt(value)*1000) : ""; }, to: function (value) { - if (!Object.is(value)) { + if (!moment.isMoment(value)) { value = moment(parseInt(value)*1000); } return value ? value.format("lll") : "";