-
-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use mui like global ponyfill (#1153)
* Use mui like global ponyfill https://twitter.com/IAmTrySound/status/1147174216095211520 With globalThis polyfill we have a browser support problem. Let's try this instead https://github.com/mui-org/material-ui/blob/master/packages/material-ui-utils/src/ponyfillGlobal.js * Rename to globalThis * changelog
- Loading branch information
Showing
12 changed files
with
61 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
packages/jss-plugin-rule-value-observable/.size-snapshot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* eslint-disable */ | ||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | ||
export default (typeof window != 'undefined' && window.Math == Math | ||
? window | ||
: typeof self != 'undefined' && self.Math == Math | ||
? self | ||
: Function('return this')()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import globalThis from './globalThis' | ||
|
||
const ns = '2f1acc6c3a606b082e5eef5e54414ffb' | ||
if (global[ns] == null) global[ns] = 0 | ||
if (globalThis[ns] == null) globalThis[ns] = 0 | ||
|
||
// Bundle may contain multiple JSS versions at the same time. In order to identify | ||
// the current version with just one short number and use it for classes generation | ||
// we use a counter. Also it is more accurate, because user can manually reevaluate | ||
// the module. | ||
export default global[ns]++ | ||
export default globalThis[ns]++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters