Skip to content

Commit

Permalink
Adding comment for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
didiergarcia committed Dec 21, 2023
1 parent f2e2df0 commit 34d5417
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/SegmentFirebase/FirebaseDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ extension FirebaseDestination {
func mapToStrings(_ mapDictionary: [String: Any?], finalize: (String, String) -> Void) {

for (key, data) in mapDictionary {

// Since dictionary values can be Optional we have to unwrap them
// before encoding so that we don't encode them as "Optional(*)"
// Note: nil values are NOT encoded.
if let d = data {
var dataString = d as? String ?? "\(d)"
let keyString = key.replacingOccurrences(of: " ", with: "_")
Expand Down

0 comments on commit 34d5417

Please sign in to comment.