Skip to content

Commit

Permalink
fix(formats): scss/map-deep type error when values are strings or null (
Browse files Browse the repository at this point in the history
#838)

fixes #837
  • Loading branch information
supermueller committed Jan 3, 2023
1 parent a6f4b34 commit d338633
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/common/templates/scss/map-deep.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
//
function processJsonNode(obj, depth) {
var output = '';
if (obj.hasOwnProperty('value')) {
if (obj === null) {
output += `''`
} else if (typeof obj === "string") {
output += `'${obj}'`
} else if (obj.hasOwnProperty('value')) {
// if we have found a leaf (a property with a value) append the value
output += `$${obj.name}`;
} else {
Expand Down

0 comments on commit d338633

Please sign in to comment.