diff --git a/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js b/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js index 5fde858e78dc2ce2799b1c016492a3d159dd5485..b9d00a04145112da9cbb2add67c893ffe0e0cf00 100644 --- a/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js +++ b/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js @@ -73,7 +73,9 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => { const { $from } = state.selection; const className = $from.parent.attrs.class ? $from.parent.attrs.class : ''; - const configTags = app.config.get('config.CustomTagService').tags; + const customTagsConfig = app.config.get('config.CustomTagService'); + const configTags = + customTagsConfig && customTagsConfig.tags ? customTagsConfig.tags : []; const [allTags, setAllTags] = useState(configTags); const tagStatus = item.active( activeView.state, diff --git a/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js b/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js index c0ba4e772581734ec536970b5109329548ca8605..e95e146f36c8c9fc5fb3a7cf1518d3c244cde2b8 100644 --- a/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js +++ b/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js @@ -127,7 +127,7 @@ const CustomTagInlineOverlayComponent = ({ mark, setPosition, position }) => { } }); const parseArray = JSON.parse(itemArtt.attrs.tagNames); - classNames = itemArtt.attrs.class + ' '; + classNames = `${itemArtt.attrs.class} `; finalTag = tagNames.concat(parseArray); }); } else {