@airwallex/airtracker
Advanced tools
Comparing version
@@ -831,2 +831,3 @@ "use strict"; | ||
updateCommonDataBasedOnConfig(config) { | ||
this.lifeCycle.emit(lifeCycleEventName.onCommonUpdated, this._commonData); | ||
this._commonData.env = config.env || this._commonData.env; | ||
@@ -837,12 +838,15 @@ this._commonData.appName = config.appName || this._commonData.appName; | ||
this._commonData.appVersion = config.appVersion || this._commonData.appVersion; | ||
this.lifeCycle.emit(lifeCycleEventName.onCommonUpdated, this._commonData); | ||
} | ||
// Can add extra common data based on developers' needs | ||
updateCommonData(extraData) { | ||
this.lifeCycle.emit(lifeCycleEventName.onCommonUpdated, this._commonData); | ||
this._commonData = __spreadValues(__spreadValues({}, this._commonData), extraData); | ||
} | ||
removeCommonDataByKey(keys) { | ||
keys.forEach((item) => { | ||
delete this._commonData[item]; | ||
}); | ||
this.lifeCycle.emit(lifeCycleEventName.onCommonUpdated, this._commonData); | ||
setTimeout(() => { | ||
keys.forEach((item) => { | ||
delete this._commonData[item]; | ||
}); | ||
}, 1e3); | ||
} | ||
@@ -849,0 +853,0 @@ // only worked if isWebappContainer is true |
{ | ||
"name": "@airwallex/airtracker", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "clean": "rm -rf ./lib", |
Sorry, the diff of this file is not supported yet
72830
0.55%2087
0.38%