fix: don't patch set data with undefined (#6694)

This commit is contained in:
Rodry
2021-10-03 13:59:52 +01:00
committed by GitHub
parent 8b4456e0aa
commit 9eb9591473
33 changed files with 1211 additions and 795 deletions

View File

@@ -125,17 +125,21 @@ class Integration extends Base {
}
_patch(data) {
/**
* The behavior of expiring subscribers
* @type {?number}
*/
this.expireBehavior = data.expire_behavior;
if ('expire_behavior' in data) {
/**
* The behavior of expiring subscribers
* @type {?number}
*/
this.expireBehavior = data.expire_behavior;
}
/**
* The grace period before expiring subscribers
* @type {?number}
*/
this.expireGracePeriod = data.expire_grace_period;
if ('expire_grace_period' in data) {
/**
* The grace period before expiring subscribers
* @type {?number}
*/
this.expireGracePeriod = data.expire_grace_period;
}
if ('application' in data) {
if (this.application) {