mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-02-17 17:01:12 -05: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 {
|
||||
NSString *label = @"undefined";
|
||||
if (![request.params[2] isEqual:[NSNull null]]) {
|
||||
label = request.params[2];
|
||||
}
|
||||
[FIRAnalytics logEventWithName:request.params[1] // action
|
||||
parameters:@{
|
||||
kFIRParameterItemName:request.params[2], // label
|
||||
kFIRParameterItemName:label, // label
|
||||
kFIRParameterItemCategory:request.params[0] // category
|
||||
}];
|
||||
[request callback:@"ok"];
|
||||
|
|
Loading…
Reference in a new issue