Skip to content

Commit cc01557

Browse files
authored
Move localstorage polyfill declaration to frontend
1 parent 29b501a commit cc01557

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,6 @@ var config = {
6060
}
6161
};
6262

63-
/* eslint-disable max-depth */
64-
/**
65-
* Adds polyfills only for browser contexts which prevents bundlers from including them.
66-
*/
67-
if (typeof window !== 'undefined' && window.document) {
68-
/**
69-
* Polyfill localStorage and sessionStorage for browsers that do not support them.
70-
*/
71-
try {
72-
if (!window.localStorage || !window.sessionStorage) {
73-
throw new Error();
74-
}
75-
76-
localStorage.setItem('storage_test', 1);
77-
localStorage.removeItem('storage_test');
78-
} catch (e) {
79-
config.deps.push('mage/polyfill');
80-
}
81-
}
82-
/* eslint-enable max-depth */
83-
8463
require(['jquery'], function ($) {
8564
'use strict';
8665

0 commit comments

Comments
 (0)