From 115a0d64a50022fc40a0f811bddd141a01876ea8 Mon Sep 17 00:00:00 2001 From: MeAkib Date: Wed, 21 Oct 2026 18:10:51 +0600 Subject: [PATCH] refactor(cdk-experimental/popover-edit): iterate map entries directly Removes an IE11 workaround that copied the map's keys into an array before iterating over them. Now that IE11 isn't supported, the entries can be iterated directly. --- src/cdk-experimental/popover-edit/edit-event-dispatcher.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cdk-experimental/popover-edit/edit-event-dispatcher.ts b/src/cdk-experimental/popover-edit/edit-event-dispatcher.ts index 591700a187f3..f6c66e9aaf8b 100644 --- a/src/cdk-experimental/popover-edit/edit-event-dispatcher.ts +++ b/src/cdk-experimental/popover-edit/edit-event-dispatcher.ts @@ -317,9 +317,8 @@ function areMapEntriesEqual(a: Map, b: Map): boolean { return false; } - // TODO: use Map.prototype.entries once we're off IE11. - for (const aKey of Array.from(a.keys())) { - if (b.get(aKey) !== a.get(aKey)) { + for (const [key, value] of a) { + if (b.get(key) !== value) { return false; } }