From 4f44cb6d9c617dd620c35aae05c627e4b643fcc9 Mon Sep 17 00:00:00 2001 From: starry-shivam Date: Thu, 19 Oct 2023 12:37:44 +0530 Subject: [PATCH] Minor fix Signed-off-by: starry-shivam --- .../main/java/com/starry/greenstash/backup/BackupManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/starry/greenstash/backup/BackupManager.kt b/app/src/main/java/com/starry/greenstash/backup/BackupManager.kt index 9dac3c19..d5d9009b 100644 --- a/app/src/main/java/com/starry/greenstash/backup/BackupManager.kt +++ b/app/src/main/java/com/starry/greenstash/backup/BackupManager.kt @@ -110,12 +110,12 @@ class BackupManager(private val context: Context, private val goalDao: GoalDao) val backupData: BackupJsonModel? = try { gsonInstance.fromJson(jsonString, BackupJsonModel::class.java) } catch (exc: Exception) { - log("Failed tp parse backup json file! Err: ${exc.message}") + log("Failed to parse backup json file! Err: ${exc.message}") exc.printStackTrace() null } - if (backupData == null) { + if (backupData?.data == null) { withContext(Dispatchers.Main) { onFailure() } return@withContext }