fix console errors

This commit is contained in:
Roland Osborne 2023-04-27 13:55:40 -07:00
parent 681bea25f8
commit 7a21b8636f
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ export function useAddTopic(contentKey) {
} }
} }
}; };
await conversation.actions.addTopic(type, message, state.assets); await conversation.actions.addTopic(type, message, [ ...state.assets ]);
updateState({ busy: false, messageText: null, textColor: '#444444', textColorSet: false, updateState({ busy: false, messageText: null, textColor: '#444444', textColorSet: false,
textSize: 12, textSizeSet: false, assets: [] }); textSize: 12, textSizeSet: false, assets: [] });
clearObjects(); clearObjects();

View File

@ -145,7 +145,7 @@ export function useConversation(cardId, channelId) {
let group = ''; let group = '';
let clickable = []; let clickable = [];
const words = text == null ? '' : DOMPurify.sanitize(text).split(' '); const words = text == [] ? '' : DOMPurify.sanitize(text).split(' ');
words.forEach((word, index) => { words.forEach((word, index) => {
if (!!urlPattern.test(word)) { if (!!urlPattern.test(word)) {
clickable.push(<span key={index}>{ group }</span>); clickable.push(<span key={index}>{ group }</span>);