File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ import { MathJax } from '#js/components/global.js' ;
2+
3+ if ( ! Object . hasOwn && MathJax . config . startup . polyfillHasOwn ) {
4+ Object . hasOwn = function ( el , prop ) {
5+ if ( typeof el === 'undefined' || el === null ) {
6+ throw new TypeError ( 'Cannot convert undefined or null to object' ) ;
7+ }
8+ return Object . prototype . hasOwnProperty . call ( Object ( el ) , prop ) ;
9+ }
10+ }
Original file line number Diff line number Diff line change 1+ import './hasown.js' ; // Can be removed with ES2024 implementation of Object.hasown
12import './lib/startup.js' ;
23
34import { combineDefaults } from '#js/components/global.js' ;
Original file line number Diff line number Diff line change @@ -620,6 +620,7 @@ if (typeof MathJax._.startup === 'undefined') {
620620 typeset : true ,
621621 ready : Startup . defaultReady . bind ( Startup ) ,
622622 pageReady : Startup . defaultPageReady . bind ( Startup ) ,
623+ polyfillHasOwn : true , // Can be removed with ES2024 implementation of Object.hasown
623624 } ) ;
624625 combineWithMathJax ( {
625626 startup : Startup ,
You can’t perform that action at this time.
0 commit comments