MOBILE-4616 login: Avoid infinite loop

main
Pau Ferrer Ocaña 2024-07-19 14:38:20 +02:00
parent d424ba0f60
commit b394cce7bd
1 changed files with 6 additions and 2 deletions

View File

@ -510,8 +510,12 @@ export class CoreLoginHelperProvider {
* @deprecated since 4.4. Please use isFeatureDisabled in a site instance.
*/
isFeatureDisabled(feature: string, config?: CoreSitePublicConfigResponse): boolean {
// eslint-disable-next-line deprecation/deprecation
return this.isFeatureDisabled(feature, config);
// eslint-disable-next-line deprecation/deprecation
const disabledFeatures = this.getDisabledFeatures(config);
const regEx = new RegExp('(,|^)' + feature + '(,|$)', 'g');
return !!disabledFeatures.match(regEx);
}
/**