cs150bf / ever-notedown

Atom Editor Plugin
MIT License
140 stars 13 forks source link

Uncaught TypeError: Cannot read property 'files' of undefined #14

Open faram964 opened 8 years ago

faram964 commented 8 years ago
  1. Drag-and-drop .png from Finder to editor window
  2. Error!

Atom Version: 1.0.19 System: Mac OS X 10.11 Thrown From: ever-notedown package, v0.2.11

Stack Trace

Uncaught TypeError: Cannot read property 'files' of undefined

At /Users/MyAccount/.atom/packages/ever-notedown/lib/ever-notedown.coffee:1858

TypeError: Cannot read property 'files' of undefined
    at Object.module.exports.onDrop (/Users/MyAccount/.atom/packages/ever-notedown/lib/ever-notedown.coffee:1858:45)
    at atom-text-editor.subscriptions.add.atom.commands.add.drop (/Users/MyAccount/.atom/packages/ever-notedown/lib/ever-notedown.coffee:445:8)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61

Commands

     -0:01.0 drop (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "atom-light-ui",
      "one-dark-syntax"
    ],
    "openEmptyEditorOnStart": false,
    "projectHome": "/Users/MyAccount/Dropbox/evnd",
    "disabledPackages": [
      "spell-check"
    ]
  },
  "ever-notedown": {
    "toc": false,
    "sortBy": "Creation Time",
    "mathjaxCustomMacros": "Default",
    "gitPath": "/Users/MyAccount/Dropbox/evnd",
    "theme": "Default 3"
  }
}

Installed Packages

# User
ever-notedown, v0.2.11

# Dev
No dev packages
cs150bf commented 8 years ago

This is kind of unfortunate because Atom apparently changed its way of handling drop events... More specifically, I think this commit changed the whole thing... (keyword: onDrop)

I'm making a note for myself here to remind myself to investigate this soon.

fiapps commented 7 years ago

I just got this same error with the current version (Atom 1.14.4, EVND 0.2.24) by using drag and drop to move a tab into a new pane.