cs150bf / ever-notedown

Atom Editor Plugin
MIT License
140 stars 13 forks source link

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

Closed zhaoshe closed 9 years ago

zhaoshe commented 9 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.0 System: Mac OS X 10.10.3 Thrown From: ever-notedown package, v0.2.4

Stack Trace

Uncaught TypeError: Cannot read property 'replace' of null

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:128

TypeError: Cannot read property 'replace' of null
    at MarkdownNote.RichNote.tidy (/Users/august/.atom/packages/ever-notedown/lib/note-prototypes/note-rich.coffee:432:18)
    at new MarkdownNote (/Users/august/.atom/packages/ever-notedown/lib/note-prototypes/note-markdown.coffee:81:12)
    at Object.findNote (/Users/august/.atom/packages/ever-notedown/lib/note-helper.coffee:78:22)
    at /Users/august/.atom/packages/ever-notedown/lib/ever-notedown.coffee:2574:25
    at _fulfilled (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:794:54)
    at self.promiseDispatch.done (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:823:30)
    at Promise.promise.promiseDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:756:13)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:516:49
    at flush (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/q/q.js:110:17)
    at process._tickCallback (node.js:357:13)

Commands

     -0:02.5.0 ever-notedown:toggle-preview (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "ever-notedown": {
    "gitPath": "/Users/august/百度云同步盘/Notes",
    "sortBy": "Notebook",
    "gitPathSymlink": false
  }
}

Installed Packages

# User
ever-notedown, v0.2.4

# Dev
No dev packages
cs150bf commented 9 years ago

Well that was not really a fix... Something probably went wrong during the Markdown->HTML conversion which I'm not sure about. But at least the error should not pop up again, and you'll probably get something that says a file does not exist, which would then give me some clue. I'm guessing there might be some problem with the file path which causes some read/write issue, but I cannot verify it for now.

cs150bf commented 9 years ago

Let me know if you're still seeing this error. Until then, I'll close this issue for now.