Skip to content

Bad expression in lib/types/model.js #421

@pip25

Description

@pip25

This part:

if (_.isUndefined(model) || _.indexOf([undefined, 'array', 'object'], model.definition.type) === -1) {
                // Use referenced schema
                cProperty = helpers.resolveSchema(model.definition);
}

is obviously incorrect, since if model is undefined, then model.definition cannot be evaluated.
Simply negating the expression causes some sort of infinite loop, however, freezing the browser, so the issue is probably more complicated than that.
This issue currently breaks Swagger-UI for me.

Metadata

Metadata

Assignees

No one assigned

    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