1

每当我单击 Markdown 文件中的某个单词时,我在控制台的 Atom Markdown 编辑器中出现以下错误

Uncaught TypeError: Cannot read property 'lineHeight' of null marker-view.coffee:23
module.exports.MarkerView.appendRegion marker-view.coffee:23
MarkerView marker-view.coffee:15
module.exports.HighlightedAreaView.handleSelection highlighted-area-view.coffee:65
(anonymous function) highlighted-area-view.coffee:1
jQuery.event.dispatch /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360
jQuery.event.trigger /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594
(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119
jQuery.extend.each /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590
jQuery.fn.jQuery.each /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237
jQuery.fn.extend.trigger /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118
$.fn.trigger main.coffee:31
module.exports.React.createClass.componentDidUpdate /Applications/Atom.app/Contents/Resources/app/src/editor-component.js:269
mixInto.notifyAll /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactMountReady.js:69
ON_DOM_READY_QUEUEING.close /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactReconcileTransa…:87
Mixin.closeAll /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:242
Mixin.perform /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:175
ReactComponent.Mixin.performUpdateIfNecessary /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactComponent.js:478
ReactCompositeComponentMixin.performUpdateIfNecessary /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeCompon…:1157
runBatchedUpdates /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:66
(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:86
Mixin.closeAll /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:242
Mixin.perform /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:175
ReactDefaultBatchingStrategy.batchedUpdates /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactDefaultBatching…:70
batchedUpdates /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:35
ReactEventEmitterMixin.handleTopLevel /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactEventEmitterMix…:53
handleTopLevelImpl /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactEventTopLevelCa…:81
(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactEventTopLevelCa…:140

我该如何修复这个错误?

4

1 回答 1

0

这是一个空引用错误。您正在为 null 的对象调用 lineHeight。

于 2014-07-12T04:22:28.223 回答