File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/core-js/internals Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ var Function = global.Function;
1212var WRAP = / M S I E .\. / . test ( USER_AGENT ) || ENGINE_IS_BUN && ( function ( ) {
1313 var version = global . Bun . version . split ( '.' ) ;
1414 return version . length < 3 || version [ 0 ] == 0 && ( version [ 1 ] < 3 || version [ 1 ] == 3 && version [ 2 ] == 0 ) ;
15- } ) ;
15+ } ) ( ) ;
1616
1717// IE9- / Bun 0.3.0- setTimeout / setInterval / setImmediate additional parameters fix
1818// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers
Original file line number Diff line number Diff line change @@ -223,11 +223,17 @@ function createStringTrimMethodTest(METHOD_NAME) {
223223}
224224
225225function IMMEDIATE ( ) {
226- return setImmediate && clearImmediate && ! IS_BUN ;
226+ return setImmediate && clearImmediate && ! ( IS_BUN && ( function ( ) {
227+ var version = global . Bun . version . split ( '.' ) ;
228+ return version . length < 3 || version [ 0 ] == 0 && ( version [ 1 ] < 3 || version [ 1 ] == 3 && version [ 2 ] == 0 ) ;
229+ } ) ( ) ) ;
227230}
228231
229232function TIMERS ( ) {
230- return ! IS_BUN && ! / M S I E .\. / . test ( USERAGENT ) ;
233+ return ! ( / M S I E .\. / . test ( USERAGENT ) || IS_BUN && ( function ( ) {
234+ var version = global . Bun . version . split ( '.' ) ;
235+ return version . length < 3 || version [ 0 ] == 0 && ( version [ 1 ] < 3 || version [ 1 ] == 3 && version [ 2 ] == 0 ) ;
236+ } ) ( ) ) ;
231237}
232238
233239GLOBAL . tests = {
You can’t perform that action at this time.
0 commit comments