Skip to content

Commit

Permalink
fix(manager): use typeof function instead of directly comparison (Jig…
Browse files Browse the repository at this point in the history
  • Loading branch information
murka authored Feb 2, 2024
1 parent 3273e7c commit 882573e
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,15 @@ Polymer({
},

_defaultDataLimitEnabledChanged(e: CustomEvent) {
const wasDataLimitEnabled = this.isDefaultDataLimitEnabled;
const isDataLimitEnabled = e.detail.value === 'enabled';
if (isDataLimitEnabled === undefined || wasDataLimitEnabled === undefined) {
if (e.detail?.value === undefined) {
return;
} else if (isDataLimitEnabled === wasDataLimitEnabled) {
}
const enableDataLimit = e.detail.value === 'enabled';
if (this.isDefaultDataLimitEnabled === enableDataLimit) {
return;
}
this.isDefaultDataLimitEnabled = isDataLimitEnabled;
if (isDataLimitEnabled) {
this.isDefaultDataLimitEnabled = enableDataLimit;
if (enableDataLimit) {
this._requestSetDefaultDataLimit();
} else {
this.fire('RemoveDefaultDataLimitRequested');
Expand Down

0 comments on commit 882573e

Please sign in to comment.