Skip to content

Typescript implementation error on IE and Edge #404

@sandinosaso

Description

@sandinosaso

Hi, thank for sharing this I found a very hard to detect bug in IE10, IE11 and all the Edge versions.

In the typescript implementation for the Env it is used a Map() is used, and the whole MalSymbol object is used as a key for saving on that Map.

When doing this.data.has(key) being key an object (the MalSymbol) it returns false in IE, Edge even when I see the key is present in the Map object.

I think this may be a difference between the IE and Edge implementations when using objects as keys of a Map object, in Chrome and Firefox it works ok.

Using just the MalSymbol value of a key can fix the problem (this is how the pure JS implementation resolves this).

This implementation has the bug (because it uses a Map with object keys): https://github.com/kanaka/mal/blob/master/ts/env.ts
This is a good implementation: https://github.com/kanaka/mal/blob/master/js/env.js

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions