Skip to content

Warning when using on empty maps #1

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

Closed
pentzzsolt opened this issue Dec 29, 2017 · 0 comments
Closed

Warning when using on empty maps #1

pentzzsolt opened this issue Dec 29, 2017 · 0 comments
Assignees

Comments

@pentzzsolt
Copy link
Owner

pentzzsolt commented Dec 29, 2017

If at least one of the maps given to the function as an argument is empty, the function returns null and throws the warning:

recursive-map-merge() expects it's parameters to be map types!

This is because Sass sees empty maps as lists:

$empty-map: ();
if type-of($empty-map) == map {
	//This code is not executed.
}
if type-of($empty-map) == list {
	//This code is executed.
}

Because the function checks if both arguments are maps, it fails with empty maps.

@pentzzsolt pentzzsolt self-assigned this Dec 29, 2017
pentzzsolt added a commit that referenced this issue Jan 7, 2018
pentzzsolt added a commit that referenced this issue Jan 7, 2018
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

1 participant