fix(EmojiWrap.js): uncaught DOMException
failed to execute 'surroundContents' on 'Range' nodes of type 'QIUWEN-EMOJI' may not be inserted inside nodes of type '#comment'
这个提交包含在:
父节点
87310764d8
当前提交
a7ec6d38a8
|
@ -60,8 +60,8 @@
|
|||
}
|
||||
|
||||
const surroundTexts = function (node, emoji) {
|
||||
const { parentNode, nodeValue: _nodeValue } = node;
|
||||
if (!_nodeValue || !parentNode) {
|
||||
const { nodeName, parentNode, nodeValue: _nodeValue } = node;
|
||||
if (nodeName === '#comment' || !_nodeValue || !parentNode) {
|
||||
return;
|
||||
}
|
||||
const startIndex = _nodeValue.indexOf(emoji);
|
||||
|
|
正在加载...
在新工单中引用
屏蔽一个用户