Skip to content

Issue with IE11 and Bootstrap 4.1.0 #26327

@dustinrowland12

Description

@dustinrowland12

Hi,

I am running into a bug in IE11 with Bootstrap 4.1.0. I think it has to do with IE11 not fully supporting ES6. The bug happens in the following function. If I call $("#id").modal() (so there are no arguments passed when calling the function), then the code will break on Object.keys(source) because source evaluates to "false" here.

function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source); <-- (code breaks here on 3rd iteration of loop)

The specific error I get in the IE11 Developer Tools console is "Object.keys: argument is not an Object".

If I do $("#id").modal({}) (so there is an empty object as an argument to the function), it works just fine.

I also found this resource on Object.keys(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
That resource mentions the issue with ES5 and passing in non-object types.

Anyway, Bootstrap 4.0.0 does not have this issue, so we are using that for now. I'd like to use the latest though, so if this can be fixed in a newer version, please do so!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions