diff options
Diffstat (limited to 'src/_props.scss')
-rw-r--r-- | src/_props.scss | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/_props.scss b/src/_props.scss index 5682611..59ecd58 100644 --- a/src/_props.scss +++ b/src/_props.scss | |||
@@ -35,6 +35,9 @@ | |||
35 | @return get($value, $key, $keys); | 35 | @return get($value, $key, $keys); |
36 | } | 36 | } |
37 | @if meta.type-of($value) == 'map' and $key != null { | 37 | @if meta.type-of($value) == 'map' and $key != null { |
38 | @if meta.type-of($key) != 'string' { | ||
39 | @error 'Expected string, got #{$key}'; | ||
40 | } | ||
38 | @return get-deep(#{$name}#{$key}, map.get($value, $key), $keys...); | 41 | @return get-deep(#{$name}#{$key}, map.get($value, $key), $keys...); |
39 | } | 42 | } |
40 | @return $name $value; | 43 | @return $name $value; |
@@ -42,6 +45,9 @@ | |||
42 | 45 | ||
43 | @function map-to-vars($name, $map) { | 46 | @function map-to-vars($name, $map) { |
44 | @if meta.type-of($map) != 'map' { | 47 | @if meta.type-of($map) != 'map' { |
48 | @if meta.type-of($name) != 'string' { | ||
49 | @error 'Expected variable name, got #{$name} instead'; | ||
50 | } | ||
45 | @return var($name); | 51 | @return var($name); |
46 | } | 52 | } |
47 | 53 | ||