slack-block-builder
Advanced tools
Comparing version 1.4.0 to 1.5.0
# Change Log | ||
## v1.5.0 – 2020-07-12 | ||
* Now all falsy values passed into appending methods are filtered before validation, not just `undefined`, making it easier to work with conditions. | ||
## v1.4.0 – 2020-07-01 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "slack-block-builder", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Maintainable code for interactive Slack messages, modals and home tabs. A must-have for the Slack Block Kit framework.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -34,3 +34,3 @@ const { ValidationHelper } = require('../helpers'); | ||
append(value, prop) { | ||
const prunedValue = value.filter((item) => typeof item !== 'undefined'); | ||
const prunedValue = value.filter(Boolean); | ||
@@ -41,4 +41,4 @@ if (prunedValue.length > 0) { | ||
this.props[prop] = typeof this.props[prop] === 'undefined' | ||
? value | ||
: this.props[prop].concat(value); | ||
? prunedValue | ||
: this.props[prop].concat(prunedValue); | ||
} | ||
@@ -45,0 +45,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159664