Skip to content

Uncaught TypeError: data.indexOf is not a function in _handle_msg_from_outside method in host.js #21

Description

@joeyaza

I get the above error as it expects data to be a string but in my case is coming in as an object from the PostMessage. And running .indexOf on a non-string throws an error.
Is there any way to counter this?
potentially, data could be stringified so its certain to be a string? or typeof data could be ascertained prior to make sure it is a string before running the indexOf method..

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