"TypeError: this.current.push is not a function" on indented comments
thevtm opened this issue · comments
Vinícius Tabille Manjabosco commented
Hi!
I've been using SugarSS a lot lattely and I'm really enjoying it! 😄
So I found a little bug when indenting comments.
This code:
// foo
// baz
Results in this error:
ERROR in /PROJECT_PATH/node_modules/file-loader/dist/cjs.js?{ "name": "bundle.css" }!/PROJECT_PATH/node_modules/postcss-loader/lib!../css/index.sss
Module build failed: TypeError: this.current.push is not a function
at Parser.init (/PROJECT_PATH/node_modules/sugarss/parser.js:256:22)
at Parser.comment (/PROJECT_PATH/node_modules/sugarss/parser.js:94:14)
at Parser.loop (/PROJECT_PATH/node_modules/sugarss/parser.js:52:22)
at parse (/PROJECT_PATH/node_modules/sugarss/parse.js:34:12)
at new LazyResult (/PROJECT_PATH/node_modules/postcss/lib/lazy-result.js:66:24)
at Processor.process (/PROJECT_PATH/node_modules/postcss/lib/processor.js:117:12)
at Promise.resolve.then.then (/PROJECT_PATH/node_modules/postcss-loader/lib/index.js:143:8)
at <anonymous>
@ ./webpack.js 6:0-79
@ ./index.js
I expected it to work just fine.
This situation happens every now and them so I managed to find a workaround:
// foo
// baz
I've also found that the same error happens with /* */
comments.
/* foo */
/* baz */
Andrey Sitnik commented
Thanks for big report. Sorry, I will have time to fix it only in the November, after my ReactiveConf talk.
But seems like it is not urgent and can wait few weeks.
Vinícius Tabille Manjabosco commented
No problem, it's definitely not urgent.
Good luck on your talk!
👍
Andrey Sitnik commented
Done dea5e73
Andrey Sitnik commented
Released in 1.0.1