peterjohnhunt / wordpress-suite

WordPress Suite is an ever expanding suite of Wordpress tools, accessible right from atom's interface!
https://atom.io/packages/wordpress-suite
13 stars 0 forks source link

Uncaught TypeError: Cannot read property 'hasRoot' of undefined #12

Closed chandraq closed 7 years ago

chandraq commented 7 years ago

[Enter steps to reproduce:]

  1. Right click on Project folder.

Atom: 1.18.0 x64 Electron: 1.3.15 OS: Microsoft Windows 10 Home Thrown From: wordpress-suite package 1.0.4

Stack Trace

Uncaught TypeError: Cannot read property 'hasRoot' of undefined

At C:\Users\CQ\.atom\packages\wordpress-suite\lib\actions.coffee:48

TypeError: Cannot read property 'hasRoot' of undefined
    at Object.shouldDisplay (/packages/wordpress-suite/lib/actions.coffee:48:129)
    at ContextMenuManager.module.exports.ContextMenuManager.cloneItemForEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/context-menu-manager.js:142:25)
    at ~/AppData/Local/atom/app-1.18.0/resources/app/src/context-menu-manager.js:152:32
    at Array.map (native)
    at ContextMenuManager.module.exports.ContextMenuManager.cloneItemForEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/context-menu-manager.js:150:43)
    at ContextMenuManager.module.exports.ContextMenuManager.templateForEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/context-menu-manager.js:100:39)
    at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (~/AppData/Local/atom/app-1.18.0/resources/app/src/context-menu-manager.js:200:33)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentContextmenu (~/AppData/Local/atom/app-1.18.0/resources/app/src/window-event-handler.js:259:53)
    at HTMLDocument.<anonymous> (~/AppData/Local/atom/app-1.18.0/resources/app/src/window-event-handler.js:3:65)

Commands

     -9:48.9.0 application:reopen-project (atom-pane.pane.active)
     -9:29.8.0 tree-view:toggle-focus (atom-pane.pane.active)
     -9:13.1.0 tabs:close-all-tabs (div.title.temp)
     -8:01.9.0 core:confirm (input.hidden-input)
  2x -1:48.1.0 tree-view:remove-project-folder (span.name.icon.icon-file-directory)
     -1:21.1.0 pane:split-right-and-copy-active-item (div.line)
     -1:09.1.0 tabs:split-right (div.title)

Non-Core Packages

atom-beautify 0.30.3 
autocomplete-wordpress-hooks 0.2.2 
emmet 2.4.3 
minimap 4.28.2 
open-in-browser 0.5.2 
platformio-ide-terminal 2.5.1 
wordpress-suite 1.0.4 
peterjohnhunt commented 7 years ago

Hi @chandraq! Thanks for using wordpress-suite and taking the time to help by submitting this bug!

One question, when this happened, can you describe any additional details? Does it happen all the time, or just some times? if just some times, is there any specific situation that seems to cause it?

Thanks again! Hopefully I can reproduce this and get it fixed up quickly!

peterjohnhunt commented 7 years ago

@chandraq just added some additional checks for various cases that should fix this in v1.0.5. Please update and feel free to reopen this ticket if you are still experiencing issues!

chandraq commented 7 years ago

Thanks. It fixed itself with a restart,, but a message came up telling me to report a bug so I did. In hindsight I would have had it happen a few more times before reporting it. Sorry for any work I caused!