You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Suneditor for a Reactjs project with Nextjs 14.
"suneditor": "^2.45.1",
"suneditor-react": "^3.6.1",
nextjs: 14.0.3.
I get this error while working in dev environment: Expected ';', '}' or <eof> ╭─[.../node_modules/suneditor/src/lib/core.js:1162:1] 1162 │ * @returns {Node} 1163 │ */ 1164 │ getSelectionNode: function () { 1165 │ if (!context.element.wysiwyg.contains(this._variable._selectionNode)) this._editorRange(); · ───────────────────────────────────┬────────────────────────────────── ──── · ╰── This is the expression part of an expression statement 1166 │ if (!this._variable._selectionNode) { 1167 │ const selectionNode = util.getChildElement(context.element.wysiwyg.firstChild, function (current) { return current.childNodes.length === 0 || current.nodeType === 3; }, false); 1167 │ if (!selectionNode) { ╰────
I discovered in function getSelectionNode and specifically line 1165 that contains special characters and is unclear
Then I tried removing them and rewriting them as follows:
and then it works normally. so can we fix it? I think it will cause errors for most of those who have been upgrading nextjs to version 14.
The text was updated successfully, but these errors were encountered:
I'm using Suneditor for a Reactjs project with Nextjs 14.
"suneditor": "^2.45.1",
"suneditor-react": "^3.6.1",
nextjs: 14.0.3.
I get this error while working in dev environment:
Expected ';', '}' or <eof> ╭─[.../node_modules/suneditor/src/lib/core.js:1162:1] 1162 │ * @returns {Node} 1163 │ */ 1164 │ getSelectionNode: function () { 1165 │ if (!context.element.wysiwyg.contains(this._variable._selectionNode)) this._editorRange(); · ───────────────────────────────────┬────────────────────────────────── ──── · ╰── This is the expression part of an expression statement 1166 │ if (!this._variable._selectionNode) { 1167 │ const selectionNode = util.getChildElement(context.element.wysiwyg.firstChild, function (current) { return current.childNodes.length === 0 || current.nodeType === 3; }, false); 1167 │ if (!selectionNode) { ╰────
I discovered in function getSelectionNode and specifically line 1165 that contains special characters and is unclear
Then I tried removing them and rewriting them as follows:
and then it works normally. so can we fix it? I think it will cause errors for most of those who have been upgrading nextjs to version 14.
The text was updated successfully, but these errors were encountered: