Generator-jhipster: IE11 stop working after upgrade

Created on 14 Dec 2016  路  7Comments  路  Source: jhipster/generator-jhipster

  • Overview of the request


I want to report a bug in src/main/webapp/app/blocks/interceptor/notification.interceptor.js This bug is occuring in IE11. Edge and other browsers are working ok

  • Motivation for or Use Case


My customers woudl like to use IE11

  • Browsers and Operating System
    IE11 , Windows 10


Only IE11

  • Suggest a Fix

Here is problematic part

var headers = Object.keys(response.headers()).filter(function (header) {
                return header.endsWith('app-alert') || header.endsWith('app-params')
            }).sort();

IE11 hangs as javascript failed on endsWidth - result is partially loaded page

I have found fix but not sure if it is best one so please just use it as sample which make it work for me

var headers = Object.keys(response.headers()).filter(function (header) {
                return header.indexOf('app-alert', header.length - 'app-alert'.length) !== -1 || header.indexOf('app-params', header.length - 'app-params'.length) !== -1;
            }).sort();
area

Most helpful comment

There is no endsWith in IE11? Can't believe how stupid this is...

@rohajda I'm pretty sure you can do the PR, have look at CONTRIBUTING.md, and of course we'll review the code.

@deepu105 that probably means we'll have a maintenance release on the 3.x maintenance branch, which is huge news: it's the first time ever we do a maintenance release! I didn't have to do any for the 1.x and 2.x branches! Which tells a lot about the quality of our releases! Thanks IE11 for breaking that trend!

All 7 comments

Ya IE just sucks. IE and Opera do not support endsWith so the proper solution would be to use indexOf. Could you submit a PR?

Ok, I will try tomorrow. Hopefully can meet your standards.

There is no endsWith in IE11? Can't believe how stupid this is...

@rohajda I'm pretty sure you can do the PR, have look at CONTRIBUTING.md, and of course we'll review the code.

@deepu105 that probably means we'll have a maintenance release on the 3.x maintenance branch, which is huge news: it's the first time ever we do a maintenance release! I didn't have to do any for the 1.x and 2.x branches! Which tells a lot about the quality of our releases! Thanks IE11 for breaking that trend!

yes one good thing is that we havent released 4.x from master yet so for users its just another patch release of 3.x but for us we need to make release from 3.x branch and backport the fix to master :)

Please note that there is now some garbage in one of the comments (npm link):

  • //AlertService.success(alertKey, { param : response.headers(headers[1])});
  • //AlertService.sucnpm linkcess(alertKey, { param : response.headers(headers[1])});

@piprog thanks

it was copy&paste issue. I have fixed that and it should be ok now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RizziCR picture RizziCR  路  3Comments

ahmedeldeeb25 picture ahmedeldeeb25  路  3Comments

Steven-Garcia picture Steven-Garcia  路  3Comments

lsadehaan picture lsadehaan  路  3Comments

tomj0101 picture tomj0101  路  3Comments