Skip to content

Prefix Validation on fromString #16

Description

@itizarsa

In the fromString method, if the prefix is omitted, the typeid passed with a random prefix succeeds, but it should fail I think.

For it to fail, we need to change the below condition

Current

if (prefix && p !== prefix) {
    throw new PrefixMismatchError(prefix, p);
}

Suggested

if (p && p !== prefix) {
    throw new PrefixMismatchError(prefix, p);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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