oddbird / accoutrement

Combined Sass Accoutrement tools, with option for individual module imports
MIT License
37 stars 6 forks source link

Maps cannot store 'false' values #38

Closed james-camilleri closed 5 years ago

james-camilleri commented 5 years ago

I'm not sure if this is by design, but storing a value of false (boolean) at any point in a map causes the get-token function to enter an infinite loop. The culprit is this line – since the correct result returned from the map-get() is false, the statement short-circuits and the key is returned again, causing a loop and eventual stack overflow.

Suggested solution is simple: use a map-has-key() function to confirm if the key exists rather than relying on the null thrown by a failed map-get(). I can fix and submit a PR if this method of action is approved.

mirisuzanne commented 5 years ago

Sure, if you submit a PR we can test it on some lager projects and make sure it's not a breaking change.

james-camilleri commented 5 years ago

Created PR #39 :)

jgerigmeyer commented 5 years ago

Closed in #37.

james-camilleri commented 5 years ago

Sorry to be a nuisance, but will you be pushing a new release any time soon please?

mirisuzanne commented 5 years ago

@jcamilleri13 I'll probably do a pre-release today for live testing, and then a full release soon.

mirisuzanne commented 5 years ago

@jcamilleri13 released v2.1.2

james-camilleri commented 5 years ago

Awesome, thanks!