11import { base , getBundle } from './bundle-graph' ;
2- import { config , doc , isRunningOnBrowser , rel , yieldInterval } from './constants' ;
2+ import { config , doc , isBrowser , rel , yieldInterval } from './constants' ;
33import type { BundleImport , BundleImports , ImportProbability } from './types' ;
44import {
55 BundleImportState_Loaded ,
@@ -180,13 +180,13 @@ function processPendingAdjustments() {
180180
181181 isAdjustmentScheduled = false ;
182182 isProcessingAdjustments = true ;
183- const deadline = isRunningOnBrowser ? performance . now ( ) + yieldInterval : 0 ;
183+ const deadline = isBrowser ? performance . now ( ) + yieldInterval : 0 ;
184184 let processed = false ;
185185
186186 while ( adjustmentStack . length ) {
187187 processed = true ;
188188 const checkDeadline = processAdjustmentFrame ( ) ;
189- if ( isRunningOnBrowser && checkDeadline && performance . now ( ) >= deadline ) {
189+ if ( isBrowser && checkDeadline && performance . now ( ) >= deadline ) {
190190 if ( ! isAdjustmentScheduled ) {
191191 isAdjustmentScheduled = true ;
192192 nextAdjustmentMacroTask ( ) ;
@@ -197,7 +197,7 @@ function processPendingAdjustments() {
197197
198198 isProcessingAdjustments = false ;
199199
200- if ( processed && isRunningOnBrowser ) {
200+ if ( processed && isBrowser ) {
201201 nextTriggerMacroTask ( ) ;
202202 }
203203}
@@ -248,7 +248,7 @@ export const adjustProbabilities = (
248248 seen ?: Set < BundleImport >
249249) => {
250250 enqueueAdjustment ( bundle , newInverseProbability , seen ) ;
251- if ( isRunningOnBrowser ) {
251+ if ( isBrowser ) {
252252 nextAdjustmentMacroTask ( ) ;
253253 } else {
254254 processPendingAdjustments ( ) ;
@@ -276,14 +276,14 @@ export const preload = (item: string | string[], probability?: number) => {
276276 } else {
277277 handleBundle ( item , inverseProbability ) ;
278278 }
279- if ( isRunningOnBrowser ) {
279+ if ( isBrowser ) {
280280 nextAdjustmentMacroTask ( ) ;
281281 } else {
282282 processPendingAdjustments ( ) ;
283283 }
284284} ;
285285
286- if ( isRunningOnBrowser ) {
286+ if ( isBrowser ) {
287287 // Get early hints from qwikloader
288288 document . addEventListener ( 'qsymbol' , ( ev ) => {
289289 const { symbol, href } = ( ev as QwikSymbolEvent ) . detail ;
0 commit comments