Looks like when targets is empty it's coming back as a boolean. and the force unwrapping is causing a crash.
TypeScript
{
"$id": "66741ca31b0639e7522d",
"$createdAt": "2024-06-20T12:12:19.995+00:00",
"$updatedAt": "2024-06-20T12:12:19.995+00:00",
"name": "redacted",
"registration": "2024-06-20T12:12:19.982+00:00",
"status": true,
"labels": [],
"passwordUpdate": "2024-06-20T12:12:19.982+00:00",
"email": "redacted",
"phone": "",
"emailVerification": false,
"phoneVerification": false,
"mfa": false,
"prefs": {},
"targets": [
false
],
"accessedAt": "2024-06-20T12:12:19.982+00:00"
}
TL;DR
The 'targets' property is sometimes returning as a boolean instead of a dictionary, causing a crash due to force unwrapping. This occurs when 'targets' is empty. To prevent the crash, handle the case where 'targets' is a boolean.Recommended threads
- I am currently seeking opportunities as ...
Hey! š I'm a Shopify guy. Been building stores for 8+ years. Still haven't lost my mind. Barely. I make stores that don't suck fast, smooth, and actually built...
- Apple OAuth2 "Registration Not Complete"...
I'm getting a "Registration Not Complete" error when implementing Apple Sign In OAuth2 on self-hosted Appwrite. Environment: Self-hosted Appwrite (latest), iOS...
- Cannot use Apple Oauth2 in React Native/...
Hi! I've trying to add the Apple sign in feature into my Expo App. I followed the docs, but I still receiving the error "Cannot set 'location.href'". Can someon...