sean-codes / atom-browser

Atom-Browser is the plugin to browse the web, preview files, auto-reload, and search Google within Atom
MIT License
39 stars 7 forks source link

Uncaught TypeError: Cannot read property 'getAttribute' of null #7

Closed halimtekin closed 6 years ago

halimtekin commented 6 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.23.1 x64 Electron: 1.6.15 OS: Mac OS X 10.12.6 Thrown From: atom-browser package 0.53.0

Stack Trace

Uncaught TypeError: Cannot read property 'getAttribute' of null

At /Users/thehalimtekin/.atom/packages/atom-browser/lib/atom-browser.js:118

TypeError: Cannot read property 'getAttribute' of null
    at Object.preview (/packages/atom-browser/lib/atom-browser.js:118:26)
    at HTMLElement.atomBrowserPreview (/packages/atom-browser/lib/atom-browser.js:23:45)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:388:36)
    at Object.didConfirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:143:35)
    at SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/node_modules/atom-select-list/src/select-list-view.js:327:26)
    at HTMLDivElement.core:confirm (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/node_modules/atom-select-list/src/select-list-view.js:84:20)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:388:36)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:108:40)

Commands

  2x -0:42.7.0 core:backspace (input.hidden-input)
     -0:39.9.0 grammar-selector:show (atom-text-editor.editor.is-focused)
  2x -0:37.3.0 core:backspace (input.hidden-input)
     -0:36.2.0 core:confirm (input.hidden-input)
     -0:34.4.0 emmet:expand-abbreviation-with-tab (input.hidden-input)
     -0:31.7.0 grammar-selector:show (atom-text-editor.editor.is-focused.has-selection)
     -0:25.7.0 core:backspace (input.hidden-input)
     -0:25.1.0 autocomplete-plus:confirm (input.hidden-input)
     -0:25.1.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:18.8.0 command-palette:toggle (input.hidden-input)
     -0:15.5.0 core:confirm (input.hidden-input)
     -0:15.5.0 atom-browser:reload (input.hidden-input)
     -0:11.2.0 command-palette:toggle (input.hidden-input)
  2x -0:07.7.0 core:move-down (input.hidden-input)
     -0:05.6.0 core:confirm (input.hidden-input)
     -0:05.6.0 atom-browser:preview (input.hidden-input)

Non-Core Packages

atom-browser 0.53.0 
auto-save-on-idle 1.2.1 
browse 1.10.5 
emmet 2.4.3 
pigments 0.40.2 
platformio-ide-terminal 2.7.0 
prime-file-icons 0.3.0 
sean-codes commented 6 years ago

Added check to make sure there is a selected option!