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

@debug does not print map entries when the key is null #1331

Closed
chriseppstein opened this issue Jul 9, 2015 · 5 comments · Fixed by #1337
Closed

@debug does not print map entries when the key is null #1331

chriseppstein opened this issue Jul 9, 2015 · 5 comments · Fixed by #1337

Comments

@chriseppstein
Copy link
Contributor

$m: (foo: 1px, null: 2px);
@debug $m;
@debug map-get($m, null);

Prints out:

stdin:1: DEBUG: (foo: 1px)
stdin:2: DEBUG: 2px
@chriseppstein
Copy link
Contributor Author

More fun stuff about @debug:

$m: (foo: 1px, null: 2px, false: 3px, true: 4px);
@debug $m;
@debug map-get($m, null);
@debug map-get($m, false);
@debug null;

prints out:

stdin:1: DEBUG: (foo: 1px, true: 4px)
stdin:2: DEBUG: 2px
stdin:3: DEBUG:
stdin:4: DEBUG:

Should print out:

Line 2 DEBUG: (foo: 1px, null: 2px, false: 3px, true: 4px)
Line 3 DEBUG: 2px
Line 4 DEBUG: 3px
Line 5 DEBUG: null

@xzyfer
Copy link
Contributor

xzyfer commented Jul 13, 2015

Thanks @chriseppstein this should be a straight forward fix.

@xzyfer xzyfer added this to the 3.3 milestone Jul 13, 2015
@xzyfer xzyfer self-assigned this Jul 13, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Jul 13, 2015

As an aside I've noticed the following now produces an error

$m: (foo: 1px, null: 2px, false: 3px, true: 4px);
Error: Duplicate key "false" in map (foo: 1px, true: 4px).
        on line 1 of test.scss
>> $m: (foo: 1px, null: 2px, false: 3px, true: 4px);

@xzyfer
Copy link
Contributor

xzyfer commented Jul 13, 2015

Spec added sass/sass-spec#437

@xzyfer
Copy link
Contributor

xzyfer commented Jul 13, 2015

This is fixed, and will be in 3.3.

An additional aspect to this issue has been broken out into #1336

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

Successfully merging a pull request may close this issue.

2 participants