Skip to content

Check before trimming string #52

Description

@bloombar

I encountered an error when trimming the string here - .trim() was not defined, meaning the str variable was not a string.

Simply checking for the existence of trim above solved the problem, e.g.

    if (!str || !str.trim) {
      return false
    }

I have not thoroughly tested, and I do not know why str is sometimes not defined correctly in my case... but this looks like an easy added check and may be useful for others.

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