File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
packages/x-license/src/utils Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1- import { ponyfillGlobal } from '@mui/utils' ;
2-
31/**
42 * @ignore - do not document.
53 */
64export interface MuiLicenseInfo {
75 key : string | undefined ;
86}
97
8+ declare namespace globalThis {
9+ // eslint-disable-next-line no-underscore-dangle, @typescript-eslint/naming-convention
10+ let __MUI_LICENSE_INFO__ : MuiLicenseInfo ;
11+ }
12+
1013// Store the license information in a global, so it can be shared
1114// when module duplication occurs. The duplication of the modules can happen
1215// if using multiple version of MUI X at the same time of the bundler
1316// decide to duplicate to improve the size of the chunks.
1417// eslint-disable-next-line no-underscore-dangle
15- ponyfillGlobal . __MUI_LICENSE_INFO__ = ponyfillGlobal . __MUI_LICENSE_INFO__ || {
18+ globalThis . __MUI_LICENSE_INFO__ = globalThis . __MUI_LICENSE_INFO__ || {
1619 key : undefined ,
1720} ;
1821
1922export class LicenseInfo {
2023 private static getLicenseInfo ( ) {
2124 // eslint-disable-next-line no-underscore-dangle
22- return ponyfillGlobal . __MUI_LICENSE_INFO__ ;
25+ return globalThis . __MUI_LICENSE_INFO__ ;
2326 }
2427
2528 public static getLicenseKey ( ) : MuiLicenseInfo [ 'key' ] {
Original file line number Diff line number Diff line change 1- import { ponyfillGlobal } from '@mui/utils' ;
2-
31// eslint-disable-next-line no-underscore-dangle
4- ponyfillGlobal . __MUI_RELEASE_INFO__ = 'MTU5NjMxOTIwMDAwMA==' ; // 2020-08-02
2+ globalThis . __MUI_RELEASE_INFO__ = 'MTU5NjMxOTIwMDAwMA==' ; // 2020-08-02
You can’t perform that action at this time.
0 commit comments