Skip to content

using .def() with oneOfType throws error #187

@donaldma

Description

@donaldma

When using .def() along with oneOfType it throws an error if the default value is not of the first type defined in oneOfType.

Example:

works (string before number):

w: oneOfType([string(), number()]).def('auto')

does not work (number before string):

w: oneOfType([number(), string()]).def('auto')

Error:

Screen Shot 2021-10-05 at 4 11 18 PM

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions