From 0faa66b6e69ec901801981ba0927351548722438 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 23 Nov 2017 11:28:05 +0200 Subject: [PATCH] Minor fixes before alpha --- src/components/RedocStandalone.tsx | 2 ++ src/components/SecurityDefs/SecurityDefs.tsx | 2 +- src/services/RedocNormalizedOptions.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/RedocStandalone.tsx b/src/components/RedocStandalone.tsx index 2c2923bf..89cd26cf 100644 --- a/src/components/RedocStandalone.tsx +++ b/src/components/RedocStandalone.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import * as PropTypes from 'prop-types'; import { Loading } from './Loading/Loading'; import { StoreProvider } from './StoreProvider'; @@ -31,6 +32,7 @@ export class RedocStandalone extends React.Component { } return null; }, + options: PropTypes.object, }; render() { diff --git a/src/components/SecurityDefs/SecurityDefs.tsx b/src/components/SecurityDefs/SecurityDefs.tsx index d5340171..4302ca99 100644 --- a/src/components/SecurityDefs/SecurityDefs.tsx +++ b/src/components/SecurityDefs/SecurityDefs.tsx @@ -55,7 +55,7 @@ export class OAuthFlow extends React.PureComponent {
    {Object.keys(flow!.scopes).map(scope => ( -
  • +
  • {scope} - {flow!.scopes[scope]}
  • ))} diff --git a/src/services/RedocNormalizedOptions.ts b/src/services/RedocNormalizedOptions.ts index 777a9175..521e9852 100644 --- a/src/services/RedocNormalizedOptions.ts +++ b/src/services/RedocNormalizedOptions.ts @@ -33,7 +33,7 @@ export class RedocNormalizedOptions { untrustedSpec: boolean; constructor(raw: RedocRawOptions) { - this.theme = mergeObjects({} as any, raw.theme || {}, defaultTheme); + this.theme = mergeObjects({} as any, defaultTheme, raw.theme || {}); this.scrollYOffset = RedocNormalizedOptions.normalizeScrollYOffset(raw.scrollYOffset); this.hideHostname = RedocNormalizedOptions.normalizeHideHostname(raw.hideHostname); this.expandResponses = RedocNormalizedOptions.normalizeExpandResponses(raw.expandResponses);