Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4b49a20

Browse files
committed
fix(@angular/build): ensure karma polyfills reporter factory returns a value
The factory function for the `reporter:angular--polyfills` Karma plugin did not return a value, which violates Karma's plugin contract. This could cause Karma to crash when multiple reporters were in use, particularly with tools that use Karma's multi-reporter functionality. This change modifies the factory to return an object with an empty `adapters` array (`{ adapters: [] }`). This satisfies Karma's plugin requirements and ensures compatibility with the multi-reporter, preventing the crash. Fixes #31039
1 parent 0bc89ef commit 4b49a20

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎packages/angular/build/src/builders/karma/application_builder.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ class AngularPolyfillsPlugin {
187187
included: true,
188188
watched: false,
189189
});
190+
191+
// Karma needs a return value for a factory and Karma's multi-reporter expects an `adapters` array
192+
return { adapters: [] };
190193
}, AngularPolyfillsPlugin),
191194
],
192195
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /