commit
61d021e522
|
@ -489,14 +489,11 @@ export class CoreAppProvider {
|
|||
this.ssoAuthenticationDeferred = CoreUtils.instance.promiseDefer<void>();
|
||||
|
||||
// Resolve it automatically after 10 seconds (it should never take that long).
|
||||
const cancelTimeout = setTimeout(() => {
|
||||
this.finishSSOAuthentication();
|
||||
}, 10000);
|
||||
const cancelTimeout = setTimeout(() => this.finishSSOAuthentication(), 10000);
|
||||
|
||||
// If the promise is resolved because finishSSOAuthentication is called, stop the cancel promise.
|
||||
this.ssoAuthenticationDeferred.promise.then(() => {
|
||||
clearTimeout(cancelTimeout);
|
||||
});
|
||||
// eslint-disable-next-line promise/catch-or-return
|
||||
this.ssoAuthenticationDeferred.promise.then(() => clearTimeout(cancelTimeout));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -248,8 +248,7 @@ export class CoreLangProvider {
|
|||
return language;
|
||||
}).catch(() =>
|
||||
// Error getting locale. Use default language.
|
||||
this.defaultLanguage,
|
||||
);
|
||||
this.defaultLanguage);
|
||||
} catch (err) {
|
||||
// Error getting locale. Use default language.
|
||||
return Promise.resolve(this.defaultLanguage);
|
||||
|
@ -339,8 +338,8 @@ export class CoreLangProvider {
|
|||
|
||||
// Convert old keys format to new one.
|
||||
const key = values[0].replace(/^mm\.core/, 'core').replace(/^mm\./, 'core.').replace(/^mma\./, 'addon.')
|
||||
.replace(/^core\.sidemenu/, 'core.mainmenu').replace(/^addon\.grades/, 'core.grades')
|
||||
.replace(/^addon\.participants/, 'core.user');
|
||||
.replace(/^core\.sidemenu/, 'core.mainmenu').replace(/^addon\.grades/, 'core.grades')
|
||||
.replace(/^addon\.participants/, 'core.user');
|
||||
|
||||
this.loadString(this.customStrings, lang, key, values[1]);
|
||||
});
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
"cordova-plugin-file-transfer",
|
||||
"cordova-plugin-inappbrowser",
|
||||
"cordova",
|
||||
"node",
|
||||
"dom-mediacapture-record"
|
||||
"dom-mediacapture-record",
|
||||
"node"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["*"],
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
"cordova-plugin-file-transfer",
|
||||
"cordova-plugin-inappbrowser",
|
||||
"cordova",
|
||||
"dom-mediacapture-record",
|
||||
"jest",
|
||||
"node",
|
||||
"dom-mediacapture-record"
|
||||
"node"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["*"],
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/tests",
|
||||
"allowJs": true,
|
||||
"esModuleInterop": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"outDir": "./out-tsc/tests",
|
||||
"types": [
|
||||
"cordova-plugin-file-transfer",
|
||||
"cordova-plugin-inappbrowser",
|
||||
"cordova",
|
||||
"dom-mediacapture-record",
|
||||
"jest",
|
||||
"node"
|
||||
],
|
||||
|
@ -31,8 +32,7 @@
|
|||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.d.ts",
|
||||
"src/tests/**/*.ts"
|
||||
"src/**/*.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue