diff --git a/src/realm/realm.js b/src/realm/realm.js index 789ee0f61..e367a2484 100644 --- a/src/realm/realm.js +++ b/src/realm/realm.js @@ -187,7 +187,10 @@ export const updateUserData = userData => export const removeUserData = username => new Promise((resolve, reject) => { try { - const account = realm.objects(USER_SCHEMA).filtered('username = $0', username); + const account = Object.assign( + [], + realm.objects(USER_SCHEMA).filtered('username = $0', username), + ); if (Array.from(account).length > 0) { realm.write(() => { realm.delete(account);