tualo / tualo-git-context

Git context menu for atom
MIT License
2 stars 0 forks source link

Uncaught TypeError: Cannot set property 'submenu' of null #26

Closed ProLoser closed 7 years ago

ProLoser commented 9 years ago

[Enter steps to reproduce below:]

  1. Right-click on a file in the tree view
  2. Error appears without showing dropmenu.

Atom Version: 1.0.7 System: Mac OS X 10.10.5 Thrown From: tualo-git-context package, v0.6.14

Stack Trace

Uncaught TypeError: Cannot set property 'submenu' of null

At /Users/Dean/.atom/packages/tualo-git-context/lib/tualo-git-context.coffee:63

TypeError: Cannot set property 'submenu' of null
  at Object.atom.contextMenu.add..tree-view.shouldDisplay (/Users/Dean/.atom/packages/tualo-git-context/lib/tualo-git-context.coffee:63:15)
  at ContextMenuManager.module.exports.ContextMenuManager.templateForEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/context-menu-manager.js:108:25)
  at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/context-menu-manager.js:166:27)
  at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:150:33)
  at HTMLDocument.handler (/Applications/Atom.app/Contents/Resources/app.asar/src/space-pen-extensions.js:112:34)
  at HTMLDocument.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4681:9)
  at HTMLDocument.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/space-pen/vendor/jquery.js:4359:46)

Commands

     -6:41.9.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -6:35.7.0 core:close (atom-text-editor.editor.is-focused)
     -6:34.9.0 fuzzy-finder:toggle-file-finder (ol.results-view.list-tree.focusable-panel.has-collapsable-children)
     -6:33.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -6:33.1.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -5:40.2.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
     -5:38.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -5:38.2.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -5:37.1.0 find-and-replace:show (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -5:30.8.0 project-find:show (atom-text-editor.editor.mini.is-focused)
     -5:29.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  2x -5:29.5.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui.find-visible)
     -5:21.1.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -5:21.1.0 git-diff-details:close-git-diff-details (atom-text-editor.editor.is-focused)
     -5:21.1.0 core:cancel (atom-text-editor.editor.is-focused)
     -5:09.1.0 core:cut (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "projectHome": "/Users/Dean/Sites",
    "disabledPackages": [
      "deprecation-cop",
      "dev-live-reload",
      "welcome",
      "language-c",
      "language-clojure",
      "language-csharp",
      "language-go",
      "language-make",
      "language-objective-c",
      "language-perl",
      "language-python",
      "language-source",
      "language-toml",
      "metrics",
      "package-generator",
      "release-notes",
      "styleguide",
      "archive-view",
      "atom-color-highlight",
      "tree-view-git-modified",
      "atom-prettify",
      "tabs-closer",
      "git-difftool",
      "git-history",
      "pepper-autocomplete",
      "autocomplete-atom-api",
      "link",
      "markdown-preview",
      "status-bar",
      "timecop",
      "Clean2",
      "react",
      "tree-view-breadcrumb",
      "minimap-autohide"
    ],
    "destroyEmptyPanes": false
  },
  "tualo-git-context": {}
}

Installed Packages

# User
.bin, vundefined
Sublime-Style-Column-Selection, v1.3.0
atom-beautify, v0.28.11
atom-typescript, v5.5.0
atomatigit, v1.5.4
auto-reveal-in-sidebar, v0.5.0
auto-update-packages, v1.0.0
autoclose-html, v0.18.0
autocomplete-paths, v1.0.2
autocomplete-ruby, v0.1.0
autohide-tree-view, v0.24.3
color-picker, v2.0.11
docblockr, v0.7.3
emmet, v2.3.12
file-icons, v1.6.9
floobits, v0.10.5
git-diff-details, v0.20.0
git-go, v1.0.1
git-log, v0.4.1
html-entities, v0.4.0
language-diff, v0.3.1
language-haml, v0.21.0
line-diff-details, v1.1.2
linter, v1.4.3
linter-jshint, vundefined
linter-rubocop, v0.3.3
linter-scss-lint, v2.0.0
minimap, v4.13.1
minimap-find-and-replace, v4.3.0
minimap-git-diff, v4.1.8
pigments, v0.11.0
sublime-word-navigation, v0.1.2
tree-view-git-branch, v0.0.2
tree-view-git-status, v0.1.2
tualo-git-context, v0.6.14
zentabs, v0.8.6

# Dev
No dev packages
thomashoffmann1979 commented 9 years ago

Hi, in version 0.6.16 i've added checking for null value, so that error should not appear anymore. But this fixes only the symptoms. At the point where the error will thrown this variable should have set up. So if you recognize any wrong behavior, tell me.
Did you renamed the context-menu?