From 13dd617208331df9156b6a6302521e9127d1625b Mon Sep 17 00:00:00 2001 From: KirillovIlya Date: Wed, 11 Jan 2023 22:20:56 +0300 Subject: [PATCH] Fix bug #60321 Fix the problem with adding a fixed form inside the complex form --- api.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/api.js b/api.js index 314a71c..fb9de6d 100644 --- a/api.js +++ b/api.js @@ -437,12 +437,14 @@ window["AscOForm"] = window.AscOForm = AscOForm; { logicDocument.Recalculate(true); let drawing = form.ConvertFormToFixed(); - - let drawingPr = new Asc.asc_CImgProperty(); - drawingPr.asc_putWrappingStyle(Asc.c_oAscWrapStyle2.Square); - drawing.Set_Props(drawingPr); - - form.MoveCursorToContentControl(false); + if (drawing) + { + let drawingPr = new Asc.asc_CImgProperty(); + drawingPr.asc_putWrappingStyle(Asc.c_oAscWrapStyle2.Square); + drawing.Set_Props(drawingPr); + + form.MoveCursorToContentControl(false); + } } }