fix: client: polyfill (#442)

This commit is contained in:
coderiaser 2025-07-26 22:48:42 +03:00
parent b34ee44bb1
commit 884c83eb60
2 changed files with 2 additions and 5 deletions

View file

@ -3,7 +3,7 @@
/* global DOM */
require('domtokenlist-shim');
const scrollIntoViewIfNeeded = require('scroll-into-view-if-needed').default;
const scrollIntoViewIfNeeded = require('scroll-into-view-if-needed');
DOM.scrollIntoViewIfNeeded = (el) => scrollIntoViewIfNeeded(el, {
block: 'nearest',

View file

@ -13,10 +13,7 @@ test('cloudcmd: client: polyfill: scrollIntoViewIfNeaded', (t) => {
global.DOM = {};
mockRequire('scroll-into-view-if-needed', {
default: scroll,
});
mockRequire('scroll-into-view-if-needed', scroll);
mockRequire.reRequire('./polyfill');
global.DOM.scrollIntoViewIfNeeded(el);