From fd3bda950cdafd7a7e79632cbba96b01de7fdc6f Mon Sep 17 00:00:00 2001 From: Johan Klintberg Date: Tue, 4 Oct 2016 21:18:19 +0200 Subject: [PATCH 1/2] Better handling of icons not in registry --- scss/_functions.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scss/_functions.scss b/scss/_functions.scss index f454b28..28264df 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -12,5 +12,8 @@ } @function mdi($name) { + @if map-has-key($mdi-icons, $name) == false { + @return ""; + } @return char(map-get($mdi-icons, $name)); } From 0d156d0d7eb582c1b2353c1a9bff476de35f70cd Mon Sep 17 00:00:00 2001 From: Johan Klintberg Date: Wed, 5 Oct 2016 11:12:55 +0200 Subject: [PATCH 2/2] Added warning --- scss/_functions.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scss/_functions.scss b/scss/_functions.scss index 28264df..d7c4fa6 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -13,7 +13,8 @@ @function mdi($name) { @if map-has-key($mdi-icons, $name) == false { - @return ""; + @warn "Icon #{$name} not found."; + @return ""; } @return char(map-get($mdi-icons, $name)); }