Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 9e52109

Browse files
bowenniThomasBurleson
authored andcommitted
chore(tests): use Array.forEach() instead Array.map()
When the `Array.map()` results are discarded, use `Array.forEach()`. Google's internal TypeScript compiler that detects calls to well-known functions and methods that return a value that is discarded. So this pattern will become a compilation error soon. Fixes #469.
1 parent 62457a5 commit 9e52109

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/media-query/mock/mock-match-media.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ export class MockMatchMedia extends MatchMedia {
153153
private _deactivateAll() {
154154
if (this._actives.length) {
155155
// Deactivate all current MQLs and reset the buffer
156-
this._actives.map(it => it.deactivate());
156+
for (const it of this._actives) {
157+
it.deactivate();
158+
}
157159
this._actives = [];
158160
}
159161
return this;

0 commit comments

Comments
 (0)