mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
parent
5dae267a54
commit
c8a5f36f17
|
@ -14,8 +14,6 @@ export interface RequestSamplesProps {
|
|||
export class RequestSamples extends React.Component<RequestSamplesProps> {
|
||||
operation: OperationModel;
|
||||
|
||||
visited = new Set();
|
||||
|
||||
render() {
|
||||
const { operation } = this.props;
|
||||
const requestBodyContent = operation.requestBody && operation.requestBody.content;
|
||||
|
|
|
@ -24,8 +24,6 @@ export interface ResponseSamplesProps {
|
|||
export class ResponseSamples extends React.Component<ResponseSamplesProps> {
|
||||
operation: OperationModel;
|
||||
|
||||
visited = new Set();
|
||||
|
||||
render() {
|
||||
const { operation } = this.props;
|
||||
const responses = operation.responses.filter(response => {
|
||||
|
|
|
@ -10,7 +10,7 @@ import { AnimatedChevronButton } from './ChevronSvg';
|
|||
|
||||
let Stickyfill;
|
||||
if (IS_BROWSER) {
|
||||
Stickyfill = require('stickyfill').default;
|
||||
Stickyfill = require('stickyfill');
|
||||
}
|
||||
|
||||
export interface StickySidebarProps {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import 'core-js/es6/promise';
|
||||
import 'core-js/fn/object/assign';
|
||||
import 'core-js/fn/string/starts-with';
|
||||
import 'core-js/fn/string/ends-with';
|
||||
import 'core-js/fn/array/find';
|
||||
import 'core-js/fn/object/assign';
|
||||
import 'core-js/fn/string/ends-with';
|
||||
import 'core-js/fn/string/starts-with';
|
||||
|
||||
import 'core-js/es6/map';
|
||||
import 'core-js/es6/set';
|
||||
import 'core-js/es6/symbol';
|
||||
|
|
|
@ -51,7 +51,8 @@ export class ScrollService {
|
|||
if (el === null) {
|
||||
return;
|
||||
}
|
||||
return Math.trunc(el.getBoundingClientRect().top) <= this.options.scrollYOffset();
|
||||
const top = el.getBoundingClientRect().top;
|
||||
return (top > 0 ? Math.floor(top) : Math.ceil(top)) <= this.options.scrollYOffset();
|
||||
}
|
||||
|
||||
subscribe(cb): () => void {
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
import * as lunr from 'lunr';
|
||||
|
||||
try {
|
||||
require('core-js/es6/promise'); // bundle into worker
|
||||
} catch (_) {
|
||||
// nope
|
||||
}
|
||||
|
||||
/* just for better typings */
|
||||
export default class Worker {
|
||||
add: typeof add = add;
|
||||
|
@ -72,8 +78,7 @@ export async function search<Meta = string>(
|
|||
}
|
||||
|
||||
let searchResults = (await index).query(t => {
|
||||
q
|
||||
.trim()
|
||||
q.trim()
|
||||
.toLowerCase()
|
||||
.split(/\s+/)
|
||||
.forEach(term => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user