Skip to content

Commit 788b871

Browse files
authored
Merge pull request QwikDev#7599 from QwikDev/fix-preloader
fix(preloader): correctly init config
2 parents b2ffcbd + e405476 commit 788b871

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/qwik/src/core/preloader/bundle-graph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ export const initPreloader = (
131131
if ('debug' in opts) {
132132
config.$DEBUG$ = !!opts.debug;
133133
}
134-
if ('preloadProbability' in opts) {
135-
config.$invPreloadProbability$ = 1 - (opts.preloadProbability as number);
134+
if (typeof opts.preloadProbability === 'number') {
135+
config.$invPreloadProbability$ = 1 - opts.preloadProbability;
136136
}
137137
}
138138
if (base != null || !serializedBundleGraph) {

0 commit comments

Comments
 (0)