bruce / atom-csscomb

Atom Editor Plugin for CSSComb [NOT MAINTAINED, SEE ISSUES]
MIT License
22 stars 4 forks source link

Uncaught TypeError: Cannot read property 'forEach' of undefined #34

Open PazzaVlad opened 9 years ago

PazzaVlad commented 9 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.3 System: Mac OS X 10.11 Thrown From: csscomb package, v0.3.1

Stack Trace

Uncaught TypeError: Cannot read property 'forEach' of undefined

At /Users/silva/.atom/packages/csscomb/node_modules/csscomb/lib/options/remove-empty-rulesets.js:8

TypeError: Cannot read property 'forEach' of undefined
  at removeEmptyRulesets (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/lib/options/remove-empty-rulesets.js:8:19)
  at processNode (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/lib/options/remove-empty-rulesets.js:3:9)
  at /Users/silva/.atom/packages/csscomb/node_modules/csscomb/lib/options/remove-empty-rulesets.js:10:13
  at Object.Node.forEach (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:63:17)
  at removeEmptyRulesets (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/lib/options/remove-empty-rulesets.js:8:20)
  at processNode (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/lib/options/remove-empty-rulesets.js:3:9)
  at [object Object].module.exports.process (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/lib/options/remove-empty-rulesets.js:61:13)
  at Object.Node.map (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:111:9)
  at /Users/silva/.atom/packages/csscomb/node_modules/csscomb/node_modules/csscomb-core/lib/core.js:132:18
  at Array.forEach (native)
  at Object.processTree (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/node_modules/csscomb-core/lib/core.js:131:19)
  at [object Object].processString (/Users/silva/.atom/packages/csscomb/node_modules/csscomb/node_modules/csscomb-core/lib/core.js:521:22)
  at /Users/silva/.atom/packages/csscomb/lib/csscomb.coffee:48:19
  at Array.forEach (native)
  at csscomb (/Users/silva/.atom/packages/csscomb/lib/csscomb.coffee:46:10)
  at atom-text-editor.<anonymous> (/Users/silva/.atom/packages/csscomb/lib/csscomb.coffee:9:3)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)

Commands

     -9:38.8.0 core:save (atom-text-editor.editor.is-focused)
     -9:31.5.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
     -9:31.5.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
     -9:25.3.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -9:24.1.0 core:move-left (atom-text-editor.editor.is-focused)
  3x -9:22.9.0 editor:select-to-end-of-word (atom-text-editor.editor.is-focused)
     -9:22 editor:select-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -9:21.2.0 core:backspace (atom-text-editor.editor.is-focused)
  4x -9:20.8.0 core:select-right (atom-text-editor.editor.is-focused)
     -9:19.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -9:12.1.0 core:save (atom-text-editor.editor.is-focused)
     -1:32.8.0 settings-view:open (atom-text-editor.editor.is-focused)
     -0:38.7.0 core:paste (atom-text-editor.editor.mini.is-focused)
     -0:37.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:06.2.0 core:close (div.settings-view.pane-item)
     -0:00.9.0 csscomb:run (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "wrap-guide",
      "welcome",
      "metrics",
      "exception-reporting",
      "language-c",
      "language-clojure",
      "language-csharp",
      "language-go",
      "language-java",
      "language-objective-c",
      "language-perl",
      "language-ruby",
      "language-ruby-on-rails",
      "language-toml",
      "language-yaml",
      "javascript-snippets",
      "jshint",
      "emmet"
    ]
  }
}

Installed Packages

# User
Stylus, v1.0.0
atom-jade, v0.3.0
autocomplete-paths, v1.0.2
color-picker, v2.0.11
csscomb, v0.3.1

# Dev
No dev packages