Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if info.version is not a string #208

Closed
lafrech opened this issue Feb 16, 2017 · 0 comments
Closed

Crash if info.version is not a string #208

lafrech opened this issue Feb 16, 2017 · 0 comments

Comments

@lafrech
Copy link

lafrech commented Feb 16, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants