Skip to content

Commit 4259d0d

Browse files
fix: fixing comparison for migration failed (#25)
error.indexOf resulted in an uncaughtException, as there is no indexOf() function for the error object. Instead, we need to get the message first. References: https://outsystemsrd.atlassian.net/browse/RMET-1771
1 parent 14c012b commit 4259d0d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixes - 2022-09-01
9+
- Fix: Fixing the way we checked the migration failed error (https://outsystemsrd.atlassian.net/browse/RMET-1771)
810

911
## [2.0.15] - 2022-04-14
1012
### Fixes

www/outsystems-secure-sqlite-init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function acquireLsk(successCallback, errorCallback) {
9797
navigator.app.exitApp();
9898
}
9999
// When secure storage key migration fails
100-
} else if (error.indexOf("MIGRATION FAILED") === 0) {
100+
} else if (error.message.indexOf("MIGRATION FAILED") === 0) {
101101
Logger.logError("Migration Failed.", "SecureSQLiteBundle");
102102
window.alert("A feature on this app failed to be upgraded. Relaunch the app to try again.");
103103
navigator.app.exitApp();

0 commit comments

Comments
 (0)