thomaslindstrom / color-picker

A color picker for the Atom Editor. Right click a color and select color picker to open it.
MIT License
246 stars 50 forks source link

Uncaught TypeError: Cannot read property 'apply' of undefined #153

Closed juliang478 closed 8 years ago

juliang478 commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.2.4 System: Microsoft Windows 10 Home Thrown From: color-picker package, v2.0.14

Stack Trace

Uncaught TypeError: Cannot read property 'apply' of undefined

At /C:/Users/juliang478/.atom/packages/color-picker/lib/modules/Emitter.coffee:15

TypeError: Cannot read property 'apply' of undefined
    at Object.emit (file:///C:/Users/juliang478/.atom/packages/color-picker/lib/modules/Emitter.coffee:11:22)
    at Object.emitClose (file:///C:/Users/juliang478/.atom/packages/color-picker/lib/ColorPicker-view.coffee:221:20)
    at Object.close (file:///C:/Users/juliang478/.atom/packages/color-picker/lib/ColorPicker-view.coffee:451:21)
    at file:///C:/Users/juliang478/.atom/packages/color-picker/lib/ColorPicker-view.coffee:139:62
    at Emitter.module.exports.Emitter.emit (C:\Users\juliang478\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\event-kit\lib\emitter.js:86:11)
    at Pane.module.exports.Pane.setActiveItem (C:\Users\juliang478\AppData\Local\atom\app-1.2.4\resources\app.asar\src\pane.js:248:22)
    at Pane.module.exports.Pane.activateItem (C:\Users\juliang478\AppData\Local\atom\app-1.2.4\resources\app.asar\src\pane.js:312:21)
    at atom-tabs.TabBarView.onMouseDown (C:\Users\juliang478\AppData\Local\atom\app-1.2.4\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:670:19)

Commands

     -1:58.2.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:57.7.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:55.5.0 core:backspace (atom-text-editor.editor.is-focused)
  3x -1:49.8.0 core:move-down (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:49.3.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:47.9.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:47.2.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -1:47.2.0 snippets:expand (atom-text-editor.editor.is-focused)
     -1:47.2.0 editor:indent (atom-text-editor.editor.is-focused)
     -1:45 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:43.4.0 core:move-down (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:43.2.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:43.2.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
     -1:40.3.0 core:save (atom-text-editor.editor.is-focused)
     -0:35.2.0 settings-view:open (atom-text-editor.editor.is-focused)
  7x -0:26.8.0 color-picker:open (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "seti-ui",
      "seti-syntax"
    ]
  }
}

Installed Packages

# User
atom-jade, v0.3.0
color-picker, v2.0.14
indent-guide-improved, v1.4.5
jade-autocompile, v0.6.5
minimap, v4.16.2
seti-syntax, v0.4.1
seti-ui, v0.8.1

# Dev
No dev packages
thomaslindstrom commented 8 years ago

Please update color-picker to v2.1.1 and restart Atom. This should be fixed now!

stephen304 commented 8 years ago

I have this same error when trying to open the color picker on an scss variable color:

$color: #000;
background-color: $color;

Edit: Actually appears to throw the error when the color picker closes.

  1. Click on $color on line 2
  2. Open color picker via ctrl + alt + c
  3. Close color picker by clicking out
  4. ???
  5. Error