Commit 0d45cf9
committed
fix(audience-sample-app): resolve CS8601 nullable warnings
Two warnings flagged by Unity's C# compiler in AudienceSample.cs.
OnSendCustomEvent: the dict was Dictionary<string,object> but `props`
(JsonReader.DeserializeObject result) is nullable. Now we only insert
the "properties" key when non-null. Side-benefit: cleaner JSON output
when no props were entered (key omitted vs serialised as null).
RedactPublishableKey: signature changed from `string? Redact(string?)`
to `string Redact(string)`. The only caller already guards with
!string.IsNullOrEmpty before invoking, so the prior nullable parameter
+ early-return-null path was dead. Non-nullable signature lets the
dict insertion in BuildInitConfigEcho compile cleanly.1 parent 52763a7 commit 0d45cf9
1 file changed
Lines changed: 7 additions & 4 deletions
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| |||
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
352 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
353 | 357 | | |
354 | | - | |
355 | 358 | | |
356 | 359 | | |
357 | | - | |
| 360 | + | |
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
| |||
0 commit comments