Skip to content

Crash if info.version is not a string #208

Closed
@lafrech

Description

@lafrech

I just experienced a crash.

ReDoc "frozen" displaying "Loading".

Debug console says

EXCEPTION: this.info.version.substring is not a function

I guess it happens here:

  init() {
    this.info = this.componentSchema.info;
    this.specUrl = this.optionsService.options.specUrl;
    if (!isNaN(parseInt(this.info.version.substring(0, 1)))) {
      this.info.version = 'v' + this.info.version;
    }
  }

My fault. Broken spec file. Version was not a string but an int.

Anyway, I suppose ReDoc would rather not crash but report a spec file issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions