Skip to content

Commit 884c83e

Browse files
committed
fix: client: polyfill (#442)
1 parent b34ee44 commit 884c83e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

client/modules/polyfill.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* global DOM */
44
require('domtokenlist-shim');
55

6-
const scrollIntoViewIfNeeded = require('scroll-into-view-if-needed').default;
6+
const scrollIntoViewIfNeeded = require('scroll-into-view-if-needed');
77

88
DOM.scrollIntoViewIfNeeded = (el) => scrollIntoViewIfNeeded(el, {
99
block: 'nearest',

client/modules/polyfill.spec.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ test('cloudcmd: client: polyfill: scrollIntoViewIfNeaded', (t) => {
1313

1414
global.DOM = {};
1515

16-
mockRequire('scroll-into-view-if-needed', {
17-
default: scroll,
18-
});
19-
16+
mockRequire('scroll-into-view-if-needed', scroll);
2017
mockRequire.reRequire('./polyfill');
2118

2219
global.DOM.scrollIntoViewIfNeeded(el);

0 commit comments

Comments
 (0)