diff --git a/src/classes/site.ts b/src/classes/site.ts index 2b46c8e86..f24809ec9 100644 --- a/src/classes/site.ts +++ b/src/classes/site.ts @@ -1061,7 +1061,7 @@ export class CoreSite { } if (alertMessage) { - let alert = this.domUtils.showAlert('core.notice', alertMessage, null, 3000); + let alert = this.domUtils.showAlert('core.notice', alertMessage, undefined, 3000); alert.onDidDismiss(() => { if (inApp) { resolve(this.utils.openInApp(url, options)); diff --git a/src/classes/sqlitedb.ts b/src/classes/sqlitedb.ts index 6b718eca8..04f9fa6f6 100644 --- a/src/classes/sqlitedb.ts +++ b/src/classes/sqlitedb.ts @@ -262,7 +262,7 @@ export class SQLiteDB { * @return {Promise} Promise resolved when done. */ deleteRecords(table: string, conditions?: object) : Promise { - if (conditions === null) { + if (conditions === null || typeof conditions == 'undefined') { // No conditions, delete the whole table. return this.execute(`DELETE FROM TABLE ${table}`); } @@ -674,10 +674,10 @@ export class SQLiteDB { */ normaliseLimitFromNum(limitFrom: any, limitNum: any) : number[] { // We explicilty treat these cases as 0. - if (limitFrom === null || limitFrom === '' || limitFrom === -1) { + if (typeof limitFrom == 'undefined' || limitFrom === null || limitFrom === '' || limitFrom === -1) { limitFrom = 0; } - if (limitNum === null || limitNum === '' || limitNum === -1) { + if (typeof limitNum == 'undefined' || limitNum === null || limitNum === '' || limitNum === -1) { limitNum = 0; } diff --git a/src/core/emulator/providers/local-notifications.ts b/src/core/emulator/providers/local-notifications.ts index 35c1b6561..d7eef13db 100644 --- a/src/core/emulator/providers/local-notifications.ts +++ b/src/core/emulator/providers/local-notifications.ts @@ -261,7 +261,7 @@ export class LocalNotificationsMock extends LocalNotifications { * @returns {Promise>} */ getAll(): Promise> { - return Promise.resolve(this.getNotifications(null, true, true)); + return Promise.resolve(this.getNotifications(undefined, true, true)); } /** @@ -292,7 +292,7 @@ export class LocalNotificationsMock extends LocalNotifications { * @returns {Promise>} */ getAllScheduled(): Promise> { - return Promise.resolve(this.getNotifications(null, true, false)); + return Promise.resolve(this.getNotifications(undefined, true, false)); } /** @@ -301,7 +301,7 @@ export class LocalNotificationsMock extends LocalNotifications { * @returns {Promise>} */ getAllTriggered(): Promise> { - return Promise.resolve(this.getNotifications(null, false, true)); + return Promise.resolve(this.getNotifications(undefined, false, true)); } /** diff --git a/src/core/login/pages/email-signup/email-signup.ts b/src/core/login/pages/email-signup/email-signup.ts index cd87027c3..dcf5a0f2e 100644 --- a/src/core/login/pages/email-signup/email-signup.ts +++ b/src/core/login/pages/email-signup/email-signup.ts @@ -71,7 +71,7 @@ export class CoreLoginEmailSignupPage { this.usernameErrors = this.loginHelper.getErrorMessages('core.login.usernamerequired'); this.passwordErrors = this.loginHelper.getErrorMessages('core.login.passwordrequired'); this.emailErrors = this.loginHelper.getErrorMessages('core.login.missingemail'); - this.email2Errors = this.loginHelper.getErrorMessages('core.login.missingemail', null, 'core.login.emailnotmatch'); + this.email2Errors = this.loginHelper.getErrorMessages('core.login.missingemail', undefined, 'core.login.emailnotmatch'); this.policyErrors = this.loginHelper.getErrorMessages('core.login.policyagree'); } diff --git a/src/core/login/providers/helper.ts b/src/core/login/providers/helper.ts index d6baa15d7..8b6314010 100644 --- a/src/core/login/providers/helper.ts +++ b/src/core/login/providers/helper.ts @@ -690,7 +690,7 @@ export class CoreLoginHelperProvider { * @param {string} error Error message. */ openChangePassword(siteUrl: string, error: string) : void { - let alert = this.domUtils.showAlert(this.translate.instant('core.notice'), error, null, 3000); + let alert = this.domUtils.showAlert(this.translate.instant('core.notice'), error, undefined, 3000); alert.onDidDismiss(() => { this.utils.openInApp(siteUrl + '/login/change_password.php'); }); diff --git a/src/providers/sites.ts b/src/providers/sites.ts index ff9877eec..00311e8bc 100644 --- a/src/providers/sites.ts +++ b/src/providers/sites.ts @@ -1043,7 +1043,7 @@ export class CoreSitesProvider { return Promise.resolve(); } - return site.getConfig(null, true); + return site.getConfig(undefined, true); } /** diff --git a/src/providers/utils/dom.ts b/src/providers/utils/dom.ts index 59d48c641..719e68a5c 100644 --- a/src/providers/utils/dom.ts +++ b/src/providers/utils/dom.ts @@ -712,7 +712,7 @@ export class CoreDomUtilsProvider { } let message = this.textUtils.decodeHTML(needsTranslate ? this.translate.instant(error) : error); - return this.showAlert(this.getErrorTitle(message), message, null, autocloseTime); + return this.showAlert(this.getErrorTitle(message), message, undefined, autocloseTime); } /**