Skip to content

Unable to get property 'modal' of undefined or null reference #21

@axelson

Description

@axelson

Via honey-badger I am getting a "Unable to get property 'modal' of undefined or null reference". It seems to only happen on windows phones. Here is the stacktrace that it gives:

webpack:///./~/simple-react-modal/build/simple-modal.js:59:0:in `this'
57     key: 'hideOnOuterClick',
58     value: function hideOnOuterClick(event) {
59       if (this.props.closeOnOuterClick === false) return;
60       if (event.target.dataset.modal && this.props.onClose instanceof Function) this.props.onClose(event);
61     }

This is the UA string I have: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)"

I believe the problem is that the event.target.dataset property was only added in IE11 whereas this browser is running IE10. Can this be worked around in the code? I don't have a windows phone on me so I'm not sure how big of a problem this is causing my users.

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