From 0f919773beb3bf46f5d0d7292d7c452b833bc10a Mon Sep 17 00:00:00 2001 From: Catalin Zalog Date: Thu, 16 Apr 2020 23:58:36 +0300 Subject: [PATCH] feat: checks for `$grid-breakpoints` map list --- scss/_functions.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scss/_functions.scss b/scss/_functions.scss index 49a4604660be..d93e33916f13 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -23,10 +23,12 @@ // Starts at zero // Used to ensure the min-width of the lowest breakpoint starts at 0. @mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") { - $values: map-values($map); - $first-value: nth($values, 1); - @if $first-value != 0 { - @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}."; + @if length($map) > 0 { + $values: map-values($map); + $first-value: nth($values, 1); + @if $first-value != 0 { + @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}."; + } } }