ryaninvents / github-issues

Issue tracking for Atom editor
MIT License
4 stars 3 forks source link

Uncaught TypeError: Cannot read property 'replace' of null #32

Closed laughedelic closed 8 years ago

laughedelic commented 8 years ago

Just installed 0.7.0 and tried to click "Issues for this repo". Should I open an issue in the marked repo?

Atom Version: 1.6.0-beta1 System: Mac OS X 10.11.1 Thrown From: github-issues package, v0.7.0

Stack Trace

Uncaught TypeError: Cannot read property 'replace' of null Please report this to https://github.com/chjj/marked.

At /Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/marked/lib/marked.js:1226

TypeError: Cannot read property 'replace' of null
Please report this to https://github.com/chjj/marked.
    at Lexer.lex (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/marked/lib/marked.js:138:5)
    at Function.Lexer.lex (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/marked/lib/marked.js:129:16)
    at marked (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/marked/lib/marked.js:1218:31)
    at /Users/laughedelic/.atom/packages/github-issues/GitIssueView.coffee:32:2
    at Array.map (native)
    at new GitIssueView (/Users/laughedelic/.atom/packages/github-issues/GitIssueView.coffee:28:8)
    at /Users/laughedelic/.atom/packages/github-issues/index.coffee:53:13
    at Workspace.module.exports.Workspace.openURIInPane (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/workspace.js:477:22)
    at Workspace.module.exports.Workspace.open (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/workspace.js:416:19)
    at atom-workspace.<anonymous> (/Users/laughedelic/.atom/packages/github-issues/index.coffee:44:24)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/atom-environment.js:1013:28)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)

Commands

     -0:05.1.0 github-issues:list (atom-text-editor.editor.vim-mode.normal-mode.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "keybinding-resolver",
      "language-objective-c",
      "distraction-free-mode",
      "language-gfm",
      "autocomplete",
      "markdown-writer",
      "markdown-lists",
      "markmon-preview",
      "markdown-preview",
      "remember-session",
      "mechanical-keyboard",
      "autocomplete-css",
      "git-tab-status",
      "minimap-git-diff",
      "autocomplete-atom-api",
      "language-clojure",
      "language-html",
      "language-less",
      "language-ruby",
      "language-c",
      "language-csharp",
      "language-go",
      "language-make",
      "language-mustache",
      "language-perl",
      "language-php",
      "language-python",
      "language-ruby-on-rails",
      "language-sass",
      "language-sql",
      "language-toml",
      "language-xml",
      "scala-worksheet",
      "scala-worksheet",
      "autocomplete-snippets",
      "autocomplete-html",
      "move-status-items",
      "autocomplete-emojis",
      "welcome",
      "autocomplete-paths",
      "bookmarks",
      "background-tips",
      "encoding-selector",
      "archive-view",
      "markdown-mindmap",
      "autocomplete-bibtex",
      "package-switch",
      "language-idris",
      "antialiased",
      "vim-mode-plus",
      "auto-reveal-in-sidebar",
      "active-files",
      "line-ending-selector",
      "linter-manager",
      "linter-annotations",
      "semanticolor",
      "pull-requests",
      "atom-telegram",
      "nav-panel",
      "metrics",
      "linter-markdown",
      "linter-scalac",
      "imdone-atom",
      "imdone-atom-github",
      "todo-manager",
      "bottom-dock",
      "git-travel",
      "build-sbt",
      "build",
      "markdown-scroll-sync",
      "github-notifications",
      "minimap-codeglance"
    ],
    "packagesWithKeymapsDisabled": [
      "linter"
    ],
    "projectHome": "~/dev",
    "themes": [
      "native-ui",
      "atom-material-syntax"
    ]
  }
}

Installed Packages

# User
Ensime, v0.35.1
atom-material-syntax, v0.3.3
auto-reveal-active-file, v0.3.1
autoflow-diffable, v0.5.0
cursor-history, v0.5.9
file-icons, v1.6.14
github-issues, v0.7.0
highlight-selected, v0.11.2
hyperclick, v0.0.35
language-diff, v0.4.0
language-elm, v1.3.2
language-haskell, v1.5.2
language-latex, v0.6.1
language-pfm, v0.82.0
language-scala, v1.1.6
latex-completions, v0.3.1
line-diff-details, v1.2.0
linter, v1.11.3
markdown-preview-plus, v2.2.2
markdown-table-formatter, v2.7.2
mathjax-wrapper, v0.1.0
minimap, v4.19.0
native-ui, v0.17.0
package-manager-commands, v2.0.3
pdf-view, v0.39.0
plain-simple, v1.0.3
pretty-json, v0.4.1
swackets, v0.10.0
vim-mode, v0.64.0

# Dev
No dev packages
ryaninvents commented 8 years ago

Did this come up from using a public repo? If so, which one? I'm a little busy at the moment but should be able to turn this around in a couple days, tops.

laughedelic commented 8 years ago

Just tried it on several public repos: all the same. Here is one for example: https://github.com/ohnosequences/cosas

ryaninvents commented 8 years ago

Ah, I've discovered the problem. marked fails when you pass it something that's not a string, and I didn't have a null/undefined check.

ryaninvents commented 8 years ago

Fixed in v0.7.1.