diff --git a/packages/plugin-assets-retry/src/runtime/asyncChunkRetry.ts b/packages/plugin-assets-retry/src/runtime/asyncChunkRetry.ts index 5c16f5766c..dfb4f36bd0 100644 --- a/packages/plugin-assets-retry/src/runtime/asyncChunkRetry.ts +++ b/packages/plugin-assets-retry/src/runtime/asyncChunkRetry.ts @@ -260,7 +260,8 @@ function ensureChunk(chunkId: string): Promise { // if __webpack_require__.e is polluted by other runtime codes, fallback to originalEnsureChunk if ( - typeof callingCounter?.count !== 'number' || + !callingCounter || + typeof callingCounter.count !== 'number' || typeof callingCounter.cssFailedCount !== 'number' ) { return result;