-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Description
This bug reported started with a question on twitter; I've been able to narrow the test case to the following, but it's still unclear whether it might have to do with the @each
and/or @if
directive parsing. In any case, in the test calls of the function, all three should return 'found true'
but only the third one does. In the first two, the first @return
directive is either not being seen or in any case it's not causing the function to exit.
@function contains-true($list) {
@each $bool in $list {
@if $bool {
@return 'found true';
}
}
@return 'nothing found';
}
.test {
out: contains-true(true false false);
out: contains-true(false true false);
out: contains-true(false false true);
}
.test {
out: 'nothing found';
out: 'nothing found';
out: 'found true'; }