Skip to content

schemaSpec is undefined for .when() inside ObjectType #73

@femi-lynx-fh

Description

@femi-lynx-fh

What version of schema-typed are you using?

2.1.3

Describe the Bug

If using the "when" method within an ObjectType, the schemaSpec variable that is passed to the method is undefined.

Expected Behavior

schemaSpec that is passed to the when method should be populated with the schema of the model.

To Reproduce

Working example without ObjectType: https://stackblitz.com/edit/typescript-jkedsj?file=index.ts
Bug example: https://stackblitz.com/edit/typescript-yv9jop?file=index.ts

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