Skip to content

Commit

Permalink
fix: parseFloat() has only one argument (#417)
Browse files Browse the repository at this point in the history
fixes issue #416
  • Loading branch information
tlehtimaki authored and dbanksdesign committed Sep 28, 2020
1 parent 76a2e9b commit 5749b2f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/common/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ module.exports = {
type: 'value',
matcher: isFontSize,
transformer: function(prop) {
return parseFloat(prop.value, 10).toFixed(2) + 'sp';
return parseFloat(prop.value).toFixed(2) + 'sp';
}
},

Expand All @@ -482,7 +482,7 @@ module.exports = {
type: 'value',
matcher: isNotFontSize,
transformer: function(prop) {
return parseFloat(prop.value, 10).toFixed(2) + 'dp';
return parseFloat(prop.value).toFixed(2) + 'dp';
}
},

Expand All @@ -501,7 +501,7 @@ module.exports = {
type: 'value',
matcher: isFontSize,
transformer: function(prop) {
return (parseFloat(prop.value, 10) * 16).toFixed(2) + 'sp';
return (parseFloat(prop.value) * 16).toFixed(2) + 'sp';
}
},

Expand All @@ -521,7 +521,7 @@ module.exports = {
type: 'value',
matcher: isNotFontSize,
transformer: function(prop) {
return (parseFloat(prop.value, 10) * 16).toFixed(2) + 'dp';
return (parseFloat(prop.value) * 16).toFixed(2) + 'dp';
}
},

Expand All @@ -541,7 +541,7 @@ module.exports = {
type: 'value',
matcher: isSize,
transformer: function(prop) {
return parseFloat(prop.value, 10) + 'px';
return parseFloat(prop.value) + 'px';
}
},

Expand All @@ -560,7 +560,7 @@ module.exports = {
type: 'value',
matcher: isSize,
transformer: function(prop) {
return parseFloat(prop.value, 10) + 'rem';
return parseFloat(prop.value) + 'rem';
}
},

Expand All @@ -579,7 +579,7 @@ module.exports = {
type: 'value',
matcher: isSize,
transformer: function(prop) {
return (parseFloat(prop.value, 10) * 16).toFixed(2) + 'f';
return (parseFloat(prop.value) * 16).toFixed(2) + 'f';
}
},

Expand All @@ -597,7 +597,7 @@ module.exports = {
type: 'value',
matcher: isSize,
transformer: function(prop) {
return `CGFloat(${(parseFloat(prop.value, 10) * 16).toFixed(2)})`;
return `CGFloat(${(parseFloat(prop.value) * 16).toFixed(2)})`;
}
},

Expand All @@ -616,7 +616,7 @@ module.exports = {
type: 'value',
matcher: isSize,
transformer: function(prop) {
return (parseFloat(prop.value, 10) * 16).toFixed(0) + 'px';
return (parseFloat(prop.value) * 16).toFixed(0) + 'px';
}
},

Expand Down

0 comments on commit 5749b2f

Please sign in to comment.