summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/darwin/scripts/generate-style-code.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index c7dace62a9..36c5e55c37 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -176,7 +176,7 @@ global.describeValue = function (value, property, layerType) {
units = ` ${units}`.replace(/pixel/, 'point');
}
if (property.name.indexOf('padding') !== -1) {
- if (value.reduce((a, b) => a + b, 0) === 0) {
+ if (value[0] === 0 && value[1] === 0 && value[2] === 0 && value[3] === 0) {
return '`NSEdgeInsetsZero` or `UIEdgeInsetsZero`';
}
return `${value[0]}${units} on the top, ${value[3]}${units} on the left, ${value[2]}${units} on the bottom, and ${value[1]}${units} on the right`;