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