React Native found: object with keys {$undefined}

I’m getting an error that reads: Error: Objects are not valid as a React child (found: object with keys {$undefined}). If you meant to render a collection of children, use an array instead.. This seems to pop up when I register a user, for which I’m using the following code:

await app.emailPasswordAuth.registerUser(phone, password);
const credentials = Realm.Credentials.emailPassword(phone, password);
const newUser = await app.logIn(credentials);
const filter = { _id: newUser.id };
const collection = newUser.mongoClient("mongodb-atlas").db("test").collection("User");
const result = await collection.updateOne(filter, { $set: { name: name, phone: phone } });
if (!admin)
     setUser(newUser);

In this app there’s an admin that is capable of registering users, but in debug, I have a normal way of registering and the bug happens either way. As the error is kind of intermittent, happening only (seemingly), but not everytime a user is registered, I’m lost as to the cause. I’d gladly share the code for the whole project if there’s a non-public way of doing so.

I asked this same question over at Stack Overflow, but I got no replies at all.