From f9618289295352c1d1109b3b98ea62a6e844da81 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini Date: Tue, 5 Dec 2023 15:10:08 +0100 Subject: [PATCH] fix: fixed enhance link for no files --- src/config/Slate/Link/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/Slate/Link/index.js b/src/config/Slate/Link/index.js index 1ceb73f96..59c9854dd 100644 --- a/src/config/Slate/Link/index.js +++ b/src/config/Slate/Link/index.js @@ -43,8 +43,9 @@ const LinkEditor = (props) => { data={{ url: node?.data?.url || '', dataElement }} theme={{}} onChangeValue={(url, dataElement, item) => { - let enhanced_link_infos = {}; + let enhanced_link_infos = null; if (item && item.getObjSize !== '0 KB') { + enhanced_link_infos = {}; enhanced_link_infos['content-type'] = item.mime_type; enhanced_link_infos.size = item.getObjSize; }