accodeing / copy-with-style

An Atom package that allows you to copy syntax highlighted code to the clipboard.
MIT License
7 stars 11 forks source link

Uncaught Error: Unable to parse color from object: {} #18

Closed magrolorenzo closed 2 years ago

magrolorenzo commented 3 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.58.0 x64 Electron: 9.4.4 OS: Unknown Windows version Thrown From: copy-with-style package 1.1.0

Stack Trace

Uncaught Error: Unable to parse color from object: {}

At C:\Users\loren\.atom\packages\copy-with-style\node_modules\color\index.js:87

Error: Unable to parse color from object: {}
    at /packages/copy-with-style/node_modules/color/index.js:87:10)
    at /packages/copy-with-style/lib/color.js:29:12)
    at RTF (/packages/copy-with-style/lib/rtf.js:34:11)
    at /packages/copy-with-style/lib/rtf_generator.js:15:16)
    at Object.copy (/packages/copy-with-style/lib/main.js:56:7)
    at HTMLElement.copyWithStylePreset1 (/packages/copy-with-style/lib/main.js:19:45)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:352326)
    at KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:1227728)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:1223862)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.58.0/resources/app/static/<embedded>:11:286651)

Commands

     -9:31.1.0 core:backspace (input.hidden-input)
     -8:41.4.0 copy-with-syntax:copy (input.hidden-input)
     -7:57.9.0 copy-as-rtf:copy (input.hidden-input)
     -7:21.7.0 copy-with-style:preset1 (input.hidden-input)
     -6:50.2.0 pane:split-up-and-copy-active-item (button.btn.btn-default.icon.icon-link-external)
  2x -4:15.6.0 core:backspace (input.hidden-input)
     -4:13.4.0 core:confirm (input.hidden-input)
     -0:04.5.0 copy-with-style:preset1 (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
atom-console 0.4.6 
atom-vue 0.6.0 
Chromo-Color-Previews 1.8.3 
comment-style 0.2.0 
copy-with-style 1.1.0 
file-icons 2.1.47 
ftp-remote-edit 0.18.2 
language-blade 0.46.0 
laravel 0.7.1 
minimap 4.40.0 
d-Pixie commented 2 years ago

I would guess that his is due to you not having a background color configured? The object, {}, in question is config.background_color and would indicated that the script is not getting a valid color value back from the settings.

Not sure how that happens, since the settings type for the value is locked to color ...