mangecoeur / document-outline

Atom plugin for showing interactive document outlines
GNU General Public License v3.0
37 stars 20 forks source link

Uncaught TypeError: Cannot read property 'index' of null #41

Closed encodis closed 7 years ago

encodis commented 7 years ago

[Enter steps to reproduce:]

  1. Open a Markdown file that does not contain a YAML metadata block. Markdown files with such a block seem to be unaffected.

Atom: 1.21.0 x64 Electron: 1.6.9 OS: Mac OS X 10.12.6 Thrown From: document-outline package 1.6.11

Stack Trace

Uncaught TypeError: Cannot read property 'index' of null

At /Users/phil/.atom/packages/document-outline/lib/markdown-model.js:18

TypeError: Cannot read property 'index' of null
    at stripYaml (/packages/document-outline/lib/markdown-model.js:18:12)
    at MarkdownModel.parse (/packages/document-outline/lib/markdown-model.js:37:12)
    at MarkdownModel.getUpdate (/packages/document-outline/lib/abstract-model.js:47:28)
    at Object.updateView (/packages/document-outline/lib/document-outline.js:148:44)
    at Object.updateCurrentEditor (/packages/document-outline/lib/document-outline.js:133:14)
    at /packages/document-outline/lib/document-outline.js:79:12
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /Applications/Atom.app/Contents/Resources/app/src/workspace.js:550:30

Commands

     -8:32.8.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-when-scrolling)
     -0:17.7.0 document-outline:toggle (input.hidden-input)
     -0:11 core:cut (input.hidden-input)
     -0:06.8.0 core:paste (input.hidden-input)

Non-Core Packages

acode-syntax 0.1.1 
acode-ui 0.1.5 
activate-power-mode 2.5.0 
advanced-open-file 0.16.6 
api-docs 0.0.6 
ask-stack 2.2.0 
atom-beautify 0.30.5 
atom-html-preview 0.2.2 
atom-keyboard-macros 0.11.0 
atom-material-syntax 1.0.6 
atom-material-ui 2.0.4 
atom-notes 1.14.1 
atom-trello 0.7.1 
atom-ungit 0.5.3 
atom-wrap-in-tag 0.6.0 
autoclose-html 0.23.0 
autocomplete-date 0.4.0 
autocomplete-paths 2.11.0 
autocomplete-xml 0.9.4 
block-comment-plus 0.5.1 
build-tools 4.5.10 
build-tools-ant 0.1.1 
busy-signal 1.4.3 
character-table 0.4.3 
charcode-display 0.2.1 
clipboard-plus 0.5.1 
color-picker 2.2.5 
css-specificity 0.2.2 
custom-title 1.0.1 
document-outline 1.6.11 
dumb-quoter 0.1.0 
ever-notedown 0.2.27 
expose 0.14.0 
file-icons 2.1.12 
filesize 3.0.0 
flex-tool-bar 0.12.0 
git-log 0.4.1 
git-plus 7.9.3 
git-time-machine 1.5.9 
highlight-selected 0.13.1 
imdone-atom 2.2.7 
import-sf-mono 1.0.1 
intentions 1.1.5 
isotope-ui 2.8.5 
keyboard-sounds 0.2.0 
language-diff 0.7.0 
language-jsoniq 1.8.0 
language-markdown 0.25.1 
language-pfm 0.82.0 
lines 0.13.1 
linter 2.2.0 
linter-bootlint 1.1.0 
linter-htmlhint 1.3.4 
linter-js-standard 4.0.2 
linter-js-standard-engine 2.1.0 
linter-markdown 5.2.0 
linter-proselint 3.3.0 
linter-sass-lint 1.8.2 
linter-ui-default 1.6.10 
markdown-preview-plus 2.4.10 
markdown-table-editor 0.6.4 
menu-editor 0.2.0 
merge-conflicts 1.4.5 
minimap 4.29.7 
minimap-highlight-selected 4.6.1 
minimap-pigments 0.2.2 
minimap-titles 1.11.0 
native-ui 0.23.0 
open-recent 5.0.0 
pdf-view 0.59.0 
pen-paper-coffee-syntax 0.14.9 
pigments 0.40.2 
pinned-tabs 1.3.0 
project-viewer 1.2.1 
random 1.3.0 
regex-railroad-diagram 0.19.4 
run-command2 1.12.2 
smart-quotes-plus 2.1.0 
split-diff 1.5.1 
standard-formatter 2.8.0 
Sublime-Style-Column-Selection 1.7.4 
svg-preview 0.11.0 
sync-settings 0.8.3 
tablr 1.8.3 
tag 0.5.0 
term3 0.22.1 
text-manipulation 0.6.0 
theme-reel 1.2.0 
theme-switcher 1.1.0 
tool-bar 1.1.0 
touch-bar-utility 2.4.0 
unity-dark-ui 2.0.9 
update-changelogs 0.1.0 
wordcount 2.10.4 
wrap-with-anything 0.1.1 
Zen 0.18.0 
salim-b commented 7 years ago

Seems to be fixed in v1.6.12 👍

mangecoeur commented 7 years ago

great, was trying to hammer out a quick fix late at night, which turns out not be a good idea >_<