Skip to content

Use of Reserved Word Breaking IE <= 8 Compatibility #2503

@vrad-joshuamckelvey

Description

@vrad-joshuamckelvey

Description
In the Knockout 3.5.1 release, there was a change to the components/defaultLoader.js that is breaking compatibility issues with IE <= 8 due to the use of reserved word default.

if (module && typeof module === 'object' && module.__esModule && module.default) { module = module.default; }

My suggested fix is to change from dot notation to bracket notation.
if (module && typeof module === 'object' && module.__esModule && module['default']) { module = module['default']; }

I have tested this with IE 8 and it seems to fix the issue.

Expected Behavior
Compatibility with IE <= 8

Actual Behavior
Unable to load page in IE <= 8

Steps to Reproduce the Problem
Open page using templates and knockout 3.5.1 in IE <=8 (or 11 in compatibility mode)

Specifications
Version: Knockout 3.5.1
Last Working Version: Knockout 3.5.0
Platform: Windows 10
Browser: IE <= 8

Additional Info
Comment on Commit

Example
IE8knockout3.5.1bug.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions