mirror of
https://github.com/Redocly/redoc.git
synced 2025-06-03 20:53:09 +03:00
chore: tests crash fix after refactor
This commit is contained in:
parent
ba22b1e352
commit
7a35a4d0de
|
@ -29,7 +29,9 @@ export class PerfectScrollbar extends React.Component<{
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const offset = (this._container.parentElement && this._container.parentElement.scrollTop) || 0;
|
const offset = (this._container.parentElement && this._container.parentElement.scrollTop) || 0;
|
||||||
this.inst = new PerfectScrollbarConstructor(this._container, this.props.options || {});
|
this.inst = new PerfectScrollbarConstructor(this._container, this.props.options || {});
|
||||||
this._container.scrollTo(0, offset);
|
if (this._container.scrollTo) {
|
||||||
|
this._container.scrollTo(0, offset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user