shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.46k stars 173 forks source link

Uncaught TypeError: Cannot read property 'destroyItem' of undefined #1584

Open FelipeAAlves opened 6 years ago

FelipeAAlves commented 6 years ago
  1. ctrl-shift-m (preview)
  2. reinstalling and restating atom didn't help

Atom: 1.27.2 x64 Electron: 1.7.15 OS: Microsoft Windows 10 Pro Thrown From: markdown-preview-enhanced package 0.15.6

Stack Trace

Uncaught TypeError: Cannot read property 'destroyItem' of undefined

At C:\Users\falves\.atom\packages\markdown-preview-enhanced\out\src\extension.js:89

TypeError: Cannot read property 'destroyItem' of undefined
    at HTMLElement.togglePreview (/packages/markdown-preview-enhanced/out/src/extension.js:89:13)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.27.2/resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.27.2/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.27.2/resources/app/src/window-event-handler.js:110:40)

Commands

     -0:50 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)
     -0:32.8.0 application:add-project-folder (input.hidden-input)
     -0:28.4.0 fuzzy-finder:toggle-file-finder (atom-workspace.workspace.scrollbars-visible-always.theme-base16-ocean-dark-syntax-theme.theme-nord-atom-ui)
     -0:27 core:confirm (input.hidden-input)
 14x -0:23 vim-mode-plus:move-down (input.hidden-input)
     -0:20.3.0 key-binding-resolver:toggle (input.hidden-input)
     -0:19.3.0 command-palette:toggle (input.hidden-input)
  2x -0:17.7.0 editor:move-to-first-character-of-line (input.hidden-input)
     -0:13.2.0 core:move-down (input.hidden-input)
     -0:12.9.0 core:move-up (input.hidden-input)
     -0:12.7.0 core:confirm (input.hidden-input)
     -0:12.7.0 markdown-preview-enhanced:toggle (input.hidden-input)
     -0:11.6.0 key-binding-resolver:toggle (input.hidden-input)
  7x -0:10 markdown-preview-enhanced:toggle (input.hidden-input)

Non-Core Packages

advanced-open-file 0.16.8 
antialiased 0.1.0 
atom-diary 1.2.1 
atom-github-theme 0.2.0 
atom-like-brackets-editor 1.2.0 
atom-material-contrast-syntax 0.3.1 
atom-material-syntax 1.0.8 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.1.3 
atom-open-this 0.3.0 
atom-shortcuts 0.0.2 
atomizr 0.23.1 
autocomplete-bibtex 1.2.1 
autocomplete-python 1.10.5 
awiki 0.3.1 
base16-ocean-dark-syntax-theme 0.1.10 
bracket-matcher-highlight 0.5.0 
browser-plus 0.0.98 
browser-plus-zoom 0.0.2 
busy-signal 1.4.3 
chester-atom-syntax 0.3.2 
city-lights-syntax 1.1.8 
city-lights-ui 1.3.3 
color-picker 2.3.0 
cursor-history 0.13.1 
date 2.1.0 
docblockr 0.13.7 
duotone-dark-syntax 2.1.0 
enhanced-tabs 1.7.0 
export-html 3.1.0 
expose 0.15.0 
fancy-bracket-matcher 2.1.0 
file-icons 2.1.21 
flatwhite-syntax 0.8.1 
fonts 3.0.3 
git-plus 7.10.2 
github-atom-light-syntax 0.5.0 
googlesearch 1.5.0 
hard-wrap 1.7.1 
haskell-unicode-snippets 0.1.1 
highlight-bad-chars 1.0.7 
highlight-column 0.5.4 
highlight-line 0.12.0 
highlight-selected 0.13.1 
imdone-atom 2.4.29 
improved-chester-atom-syntax 0.3.0 
indent-guide-improved 1.4.13 
ink 0.8.5 
insert-timestamp 0.2.4 
isotope-light-ui 2.3.0 
isotope-ui 2.8.5 
julia-client 0.6.13 
keyboard-scroll 0.7.0 
keystroke 0.4.0 
language-fortran 2.1.6 
language-gitignore 0.3.0 
language-julia 0.16.0 
language-latex 1.1.1 
language-markdown 0.25.1 
language-matlab 0.2.1 
language-restructuredtext 1.1.2 
language-todo-more-words 2.7.0 
latex 0.50.0 
latex-completions 0.3.3 
latex-friend 0.0.11 
lateX-shortcut 0.3.0 
latex-tree 0.3.0 
latexer 0.3.0 
lazy-motion 0.7.0 
markdown-document 0.2.1 
markdown-preview-enhanced 0.15.6 
markdown-preview-plus 3.2.2 
markdown-themeable-pdf 1.2.1 
markdown-toc-auto 0.9.0 
markdown-writer 2.7.3 
material 2.2.0 
material-monokai-syntax 1.0.1 
minimap 4.29.8 
monokai 0.24.0 
monokai-seti 0.9.0 
multi-cursor 2.1.5 
multi-cursor-plus 1.2.0 
multi-theme-applicator 1.3.6 
narrow 0.65.0 
narrow-git-ls 0.2.0 
nord-atom-syntax 0.9.1 
nord-atom-ui 0.11.0 
nord-atom-ui-vertical-tabs 0.0.5 
nordkind-dark-syntax 0.6.0 
northem-atom-syntax 2.1.0 
northem-atom-ui 2.1.0 
northem-dark-atom-syntax 2.1.0 
northem-dark-atom-ui 2.1.0 
oceanic-next 1.0.0 
oceanic-one-dark-syntax 2.0.0 
one-dark-material-syntax 1.0.3 
open-conemu-here 0.5.0 
open-this 0.5.0 
organized 0.8.1 
pane-browser 1.6.0 
paner 1.0.0 
pdf-view 0.70.0 
pigments 0.40.2 
print-atom 0.1.1 
print-code 0.7.1 
pristine-ui 1.1.11 
project-manager 3.3.6 
pure-syntax 0.3.0 
quick-file-actions 0.2.2 
quick-highlight 0.13.0 
relative-numbers 0.9.0 
rst-preview-pandoc 0.1.12 
seti-icons 1.5.4 
seti-syntax 1.1.3 
seti-ui 1.10.0 
show-in-folder 0.6.0 
simple-drag-drop-text 0.4.0 
styri-syntax 0.2.0 
sumatra-forwardsearch 0.11.0 
sync-settings 0.8.6 
tab-close 2.1.0 
tab-switcher 1.5.6 
tablr 1.8.3 
tasks 2.10.1 
theme-switch 0.6.0 
tidy-tabs 0.4.0 
todo-show 2.3.0 
tree-view-open-files 0.3.0 
vertical-tabs 1.0.7 
vertical-tabs-plus 2.4.0 
vim-mode-plus 1.32.0 
vim-mode-plus-keymaps-for-surround 0.2.1 
vim-mode-plus-move-to-symbols 0.5.0 
web-search 0.3.3 
wordcount 3.0.0 
wrap 0.1.0 
wraptor 0.2.1 
Zen 0.18.0 
datavectors commented 6 years ago

I have just experienced the same error after recently installing a new batch of additional packages. Retracing my steps to disable newly installed packages, and acting on a hunch, I first disabled minimap (since it is inside the markdown window), then applied Window:Reload (to refresh Atom) and the error had gone. However, I then re-enabled minimap and instead of seeing the error again as I expected, it has still not reappeared (for now). I am on Atom 1.30.