fix(tracker):default-null payload for user emited events
This commit is contained in:
parent
7860d88879
commit
731bc1241a
1 changed files with 2 additions and 2 deletions
|
|
@ -245,7 +245,7 @@ export default class API {
|
|||
this.setMetadata(key, value)
|
||||
}
|
||||
|
||||
event(key: string, payload: any, issue = false): void {
|
||||
event(key: string, payload: any = null, issue = false): void {
|
||||
if (typeof key === 'string' && this.app !== null) {
|
||||
if (issue) {
|
||||
return this.issue(key, payload)
|
||||
|
|
@ -260,7 +260,7 @@ export default class API {
|
|||
}
|
||||
}
|
||||
|
||||
issue(key: string, payload: any): void {
|
||||
issue(key: string, payload: any = null): void {
|
||||
if (typeof key === 'string' && this.app !== null) {
|
||||
try {
|
||||
payload = JSON.stringify(payload)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue