Skip to content

Commit e1a98e2

Browse files
author
Mateusz Krzeszowiak
committed
Fix static tests
1 parent f81f12e commit e1a98e2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/code/Magento/Theme/view/base/requirejs-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ var config = {
6060
}
6161
};
6262

63+
/* eslint-disable max-depth */
6364
/**
6465
* Adds polyfills only for browser contexts which prevents bundlers from including them.
6566
*/
66-
if (typeof window !== "undefined" && window.document) {
67+
if (typeof window !== 'undefined' && window.document) {
6768
/**
6869
* Polyfill localStorage and sessionStorage for browsers that do not support them.
6970
*/
@@ -78,6 +79,7 @@ if (typeof window !== "undefined" && window.document) {
7879
config.deps.push('mage/polyfill');
7980
}
8081
}
82+
/* eslint-enable max-depth */
8183

8284
require(['jquery'], function ($) {
8385
'use strict';

lib/web/mage/polyfill.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
(function (root, doc) {
22
'use strict';
3+
4+
var Storage;
5+
36
try {
47
if (!root.localStorage || !root.sessionStorage) {
58
throw new Error();
@@ -12,7 +15,7 @@
1215
* Returns a storage object to shim local or sessionStorage
1316
* @param {String} type - either 'local' or 'session'
1417
*/
15-
var Storage = function (type) {
18+
Storage = function (type) {
1619
var data;
1720

1821
/**

0 commit comments

Comments
 (0)