ErikWittern / openapi-snippet

Generates code snippets for given Swagger / Open API documents
MIT License
120 stars 67 forks source link

OpenAPISnippets let over const #36

Closed povilass closed 4 years ago

povilass commented 4 years ago

https://github.com/ErikWittern/openapi-snippet/blame/d31d79a19a22a3f08285f46fab81d8d63fc6299f/index.js#L202

const OpenAPISnippets = window.OpenAPISnippets || {} <------- let over const

// define that object OpenAPISnippets = { getSnippets, getEndpointSnippets }

can you fix issue where you can't redefine OpenAPISnippets because it's const and it fails of readonly property.

ErikWittern commented 4 years ago

@povilass Thanks for filing the issue, and @joe642 for the PR! I released a new version with the fix: https://github.com/ErikWittern/openapi-snippet/releases/tag/v0.8.1