rennzhang / codemirror-editor-vue3

CodeMirror component for Vue3
https://rennzhang.github.io/codemirror-editor-vue3
MIT License
195 stars 39 forks source link

merge 模式报错 #14

Closed songyang1996 closed 2 years ago

songyang1996 commented 2 years ago

https://renncheung.github.io/codemirror-editor-vue3/merge/index.html 官方文档中存在报错,编辑器渲染为空。

app.630317b7.js:1 TypeError: Cannot read properties of undefined (reading 'appendChild') at new E.MergeView (index.0db5470d.js:24:15082)


通过 sourcemap 看起来是 codemirror/addon/merge/merge.js 542行 下的 MergeView = CodeMirror.MergeView = function(node, options) {} 参数node为none。 574行 var wrapElt = this.wrap = node.appendChild(elt("div", wrap, "CodeMirror-merge CodeMirror-merge-" + panes + "pane")); 导致的空指针报错

rennzhang commented 2 years ago

最新版本已解决。

之后有空会考虑加上单元测试。