mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-08-28 22:18:54 -04:00
Fix Firebase warnings
Don’t pass NSNulls to Firebase. Paramaters must be string or integer, so use ‘undefined’ to match current values.
This commit is contained in:
parent
45b06ee8a6
commit
c5b57966b1
1 changed files with 5 additions and 1 deletions
|
@ -169,9 +169,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) analyticsEvent: (JsRequest *) request {
|
-(void) analyticsEvent: (JsRequest *) request {
|
||||||
|
NSString *label = @"undefined";
|
||||||
|
if (![request.params[2] isEqual:[NSNull null]]) {
|
||||||
|
label = request.params[2];
|
||||||
|
}
|
||||||
[FIRAnalytics logEventWithName:request.params[1] // action
|
[FIRAnalytics logEventWithName:request.params[1] // action
|
||||||
parameters:@{
|
parameters:@{
|
||||||
kFIRParameterItemName:request.params[2], // label
|
kFIRParameterItemName:label, // label
|
||||||
kFIRParameterItemCategory:request.params[0] // category
|
kFIRParameterItemCategory:request.params[0] // category
|
||||||
}];
|
}];
|
||||||
[request callback:@"ok"];
|
[request callback:@"ok"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue