Skip to content

Commit ee4eae1

Browse files
committed
some adjusts
1 parent 2c9a0cb commit ee4eae1

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

components/sendgrid/actions/common/common.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ export default {
9393
* @param {object} value the value to check for returning `undefined`.
9494
*/
9595
convertEmptyStringToUndefined(value) {
96+
if (Array.isArray(value) && value.length === 0) {
97+
return undefined;
98+
}
9699
if (value === "" || value === null) {
97100
return undefined;
98101
}

components/sendgrid/actions/send-email-multiple-recipients/send-email-multiple-recipients.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default {
226226
};
227227
}
228228
this.sendAt = this.convertEmptyStringToUndefined(Date.parse(this.sendAt));
229-
if (this.sendAt != null) {
229+
if (this.sendAt) {
230230
constraints.sendAt = this.getIntegerGtZeroConstraint();
231231
}
232232
if (this.asm || this.asmGroupsToDisplay) {

components/sendgrid/actions/send-email-single-recipient/send-email-single-recipient.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export default {
250250
};
251251
}
252252
this.sendAt = this.convertEmptyStringToUndefined(Date.parse(this.sendAt));
253-
if (this.sendAt != null) {
253+
if (this.sendAt) {
254254
constraints.sendAt = this.getIntegerGtZeroConstraint();
255255
}
256256
//Executes validation

0 commit comments

Comments
 (0)