Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

includes() javascript function does not work on Internet Explorer #6953

Closed
1 task done
GuiF007 opened this issue Jan 5, 2018 · 0 comments
Closed
1 task done

includes() javascript function does not work on Internet Explorer #6953

GuiF007 opened this issue Jan 5, 2018 · 0 comments
Milestone

Comments

@GuiF007
Copy link
Contributor

GuiF007 commented Jan 5, 2018

Overview of the issue

On jHipster v4.13.x, with Internet Explorer, I cannot navigate to entities page, because of a bug in javascript function :
EXCEPTION: Object doesn't support property or method 'includes'
Stacktrace suggests hasAnyAuthorityDirect function from src/main/webapp/app/shared/auth/principal.service.ts :

hasAnyAuthorityDirect(authorities: string[]): boolean {
[...]
        for (let i = 0; i < authorities.length; i++) {
            if (this.userIdentity.authorities.**includes**(authorities[i])) {
                return true;
            }
        }
[...]
}

Transpiled the same way in JS.

Motivation for or Use Case

Impossible to navigate on these pages with Internet Explorer 11, and I guess all version of Internet Explorer : Can I Use includes functions

Reproduce the error

With last version of jHipster, just generate a simple app and try to navigate to entities page. Nothing happen !

Related issues

I look for something about polyfills and Internet explorer, but nothing found :/

Suggest a Fix

Add 'core-js/es7/arrays' in polyfills.
Found the way to fix here : angular/angular-cli#4128

JHipster Version(s)

Tested on 4.13.1

JHipster configuration

Not relevant

Entity configuration(s) entityName.json files generated in the .jhipster directory

Not relevant

Browsers and Operating System

Internet Explorer 11 is KO. Edge is OK. Google is OK.
See this : Can I Use includes functions

  • Checking this box is mandatory (this is just to show you read everything)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants