Commit 22bdf45
committed
Fix issue where AsyncStorage can't re-set unsentEventString nor unsentIdentifyKey when they are null
As part of migrating unsentEvents, we are appending this._storageSuffix to both the unsentKey and unsentIdentifyKey.
When either one of these is null, AsyncStorage.setItem breaks because it expects strings.
To fix this, I'm only migrating these values if they are valid and not null. It might be an overkill, but I'm
also explicitly JSON.stringifying the values.1 parent b06134c commit 22bdf45
1 file changed
+21
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
252 | 262 | | |
253 | 263 | | |
254 | 264 | | |
| |||
0 commit comments