Updated removeUserData

This commit is contained in:
Mustafa Buyukcelebi 2019-08-23 13:58:03 +03:00
parent e5aeb71f8e
commit 6cdbc823d4

View File

@ -193,10 +193,7 @@ export const updateUserData = userData =>
export const removeUserData = username =>
new Promise((resolve, reject) => {
try {
const account = Object.assign(
[],
Array.from(realm.objects(USER_SCHEMA).filtered('username = $0', username)),
);
const account = Array.from(realm.objects(USER_SCHEMA).filtered('username = $0', username));
if (convertToArray(account).length > 0) {
realm.write(() => {
realm.delete(account);