未捕获的TypeError:无法读取属性' lineHeight'为null

时间:2014-07-12 04:20:47

标签: javascript markdown atom-editor

每当我点击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

如何修复此错误?

1 个答案:

答案 0 :(得分:0)

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