From c9a4dd11b93365af886134f619e0b0dc9ebdc1cb Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Fri, 26 Nov 2021 11:48:03 +0100 Subject: [PATCH] fix: fix crashing the editor after refresh Main fix was introduced as part of swagger-ui@4.1.2. Refs #2099 --- package-lock.json | 6 +++--- package.json | 2 +- src/plugins/jump-to-path/index.js | 6 ++++-- .../jump-to-path/{components.jsx => jump-to-path.jsx} | 5 ++++- 4 files changed, 12 insertions(+), 7 deletions(-) rename src/plugins/jump-to-path/{components.jsx => jump-to-path.jsx} (95%) diff --git a/package-lock.json b/package-lock.json index 9ffc1662233..95172098582 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32467,9 +32467,9 @@ } }, "swagger-ui": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-4.1.1.tgz", - "integrity": "sha512-DzCNcFX9FCPDmZru/xdY4xEOY9DsI/GuxCu1SDswpEGJkYdB/do+owaEFl9bWDor6AV9xpEVcjldiR+mrruMFg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-4.1.2.tgz", + "integrity": "sha512-g4v9WcjnFvQMkrZFsCBx7OPI89eLWlc5SK5YeSsybXZmi4H11fCw4QjodMbPFeFwoo2St3U1DuKG4BheLSOFtA==", "requires": { "@babel/runtime-corejs3": "^7.16.3", "@braintree/sanitize-url": "^5.0.2", diff --git a/package.json b/package.json index d6e6524d9b1..02bff1541ab 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "redux": "=4.1.2", "reselect": "^4.0.0", "swagger-client": "^3.17.0", - "swagger-ui": "^4.1.1", + "swagger-ui": "^4.1.2", "traverse": "^0.6.6", "validator": "=13.7.0", "yaml-js": "^0.3.1" diff --git a/src/plugins/jump-to-path/index.js b/src/plugins/jump-to-path/index.js index dfe637db2c1..0447f6dbe61 100644 --- a/src/plugins/jump-to-path/index.js +++ b/src/plugins/jump-to-path/index.js @@ -1,11 +1,13 @@ import spec from "./spec" -import * as components from "./components" +import JumpToPath from "./jump-to-path" export default function JumpToPathPlugin() { return [ spec, { - components, + components: { + JumpToPath + }, } ] } diff --git a/src/plugins/jump-to-path/components.jsx b/src/plugins/jump-to-path/jump-to-path.jsx similarity index 95% rename from src/plugins/jump-to-path/components.jsx rename to src/plugins/jump-to-path/jump-to-path.jsx index 6f90a93c26d..8ec7f621e86 100644 --- a/src/plugins/jump-to-path/components.jsx +++ b/src/plugins/jump-to-path/jump-to-path.jsx @@ -1,8 +1,9 @@ import React from "react" import PropTypes from "prop-types" + import JumpIcon from "./jump-icon.svg" -export class JumpToPath extends React.Component { +class JumpToPath extends React.Component { static propTypes = { editorActions: PropTypes.object.isRequired, specSelectors: PropTypes.object.isRequired, @@ -62,3 +63,5 @@ export class JumpToPath extends React.Component { } } } + +export default JumpToPath