Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space-between-declarations fails on media queries #378

Closed
aymanrady opened this issue May 20, 2015 · 5 comments
Closed

space-between-declarations fails on media queries #378

aymanrady opened this issue May 20, 2015 · 5 comments

Comments

@aymanrady
Copy link

options/space-between-declarations.js throws error while parsing css file with media query

TypeError: Object ( has no method 'is'
    at module.exports.process (/srv/www/csscomb-testcase/node_modules/csscomb/lib/options/space-between-declarations.js:71:50)
    at Object.Node.map (/srv/www/csscomb-testcase/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:111:9)
    at /srv/www/csscomb-testcase/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:117:22
    at Array.forEach (native)
    at Object.Node.map (/srv/www/csscomb-testcase/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:115:22)
    at /srv/www/csscomb-testcase/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:117:22
    at Array.forEach (native)
    at Object.Node.map (/srv/www/csscomb-testcase/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:115:22)
    at /srv/www/csscomb-testcase/node_modules/csscomb/node_modules/gonzales-pe/lib/node.js:117:22
    at Array.forEach (native)

the problem is with this code options/space-between-declarations.js#L71

if (!node.get(i) || !node.get(i).is('declarationDelimiter')) continue;

gonzales-pe doesn't return a Node object for ( & )

simplified test-case

@tonyganch
Copy link
Member

Thank you! Will take a look

@tonyganch
Copy link
Member

Fixed in [email protected]

@Swerner1975
Copy link

Same problem here on other file (with the new csscomb):

TypeError: Object appVariantsForm has no method 'is'
at processNode (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\lib\options\block-indent.js:24:19)
at processNode (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\lib\options\block-indent.js:26:13)
at processNode (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\lib\options\block-indent.js:26:13)
at processNode (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\lib\options\block-indent.js:26:13)
at processNode (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\lib\options\block-indent.js:26:13)
at process (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\lib\options\block-indent.js:102:13)
at Object.Node.map (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\node_modules\gonzales-pe\lib\node.js:111:9)
at d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\node_modules\csscomb-core\lib\core.js:189:18
at Array.forEach (native)
at processTree (d:\gulp-project\node_modules\gulp-csscomb\node_modules\csscomb\node_modules\csscomb-core\lib\core.js:188:19)

@tonyganch
Copy link
Member

@Swerner1975, can you please share your code so I can write a test?

@tonyganch tonyganch reopened this May 20, 2015
@Swerner1975
Copy link

Look at issue #379 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants