From d29cfce4e3ce462188ed073c4ff5944e01388601 Mon Sep 17 00:00:00 2001 From: nerozya_i Date: Wed, 27 Dec 2023 17:13:40 +0200 Subject: [PATCH] Issue #2575 add await for clear() method execution in renderFromHTML --- src/components/modules/api/blocks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/modules/api/blocks.ts b/src/components/modules/api/blocks.ts index 1d6a782f..5b816095 100644 --- a/src/components/modules/api/blocks.ts +++ b/src/components/modules/api/blocks.ts @@ -205,8 +205,8 @@ export default class BlocksAPI extends Module { * @param {string} data - HTML string to render * @returns {Promise} */ - public renderFromHTML(data: string): Promise { - this.Editor.BlockManager.clear(); + public async renderFromHTML(data: string): Promise { + await this.Editor.BlockManager.clear(); return this.Editor.Paste.processText(data, true); }