Skip to content

Prefix Validation on fromString #16

@itizarsa

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions