From 43c05c6041e13232c035228f0b6bb0cff69b6ae8 Mon Sep 17 00:00:00 2001 From: "Oleg.Korshul" Date: Thu, 11 Apr 2024 17:02:21 +0300 Subject: [PATCH] Fix fromJS method --- DesktopEditor/doctrenderer/json/serialization.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DesktopEditor/doctrenderer/json/serialization.h b/DesktopEditor/doctrenderer/json/serialization.h index d7a8a11f38..07a75a3868 100644 --- a/DesktopEditor/doctrenderer/json/serialization.h +++ b/DesktopEditor/doctrenderer/json/serialization.h @@ -68,6 +68,8 @@ namespace NSJSON static CValue fromJS(JSSmart jsValue) { + if (!jsValue.is_init()) + return CValue::CreateUndefined(); if (jsValue->isUndefined()) return CValue::CreateUndefined(); if (jsValue->isNull())