fix: Fixed issue where app would not load when using snap

This commit is contained in:
Aman Harwara
2023-08-11 22:22:02 +05:30
parent 2122f405eb
commit c5c0bd6871

View File

@@ -104,7 +104,11 @@ function migrateSnapStorage() {
const snapUserData = process.env['SNAP_USER_DATA']
const store = new Store(snapUserCommonDir)
if (snapUserData && store.data.backupsLocation.startsWith(path.resolve(snapUserData, '..'))) {
if (
snapUserData &&
store.data.backupsLocation &&
store.data.backupsLocation.startsWith(path.resolve(snapUserData, '..'))
) {
/**
* Backups location has not been altered by the user. Move it to the
* user documents directory