Skip to content

Commit 96f8160

Browse files
committed
remove side-effect
1 parent 36ec4e5 commit 96f8160

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/svelte/src/utils.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,9 @@ const DOM_PROPERTIES = [
216216
'srcObject'
217217
];
218218

219-
export const DOM_PROPERTIES_MAP = new Map();
220-
221-
for (const property of DOM_PROPERTIES) {
222-
DOM_PROPERTIES_MAP.set(property.toLowerCase(), property);
223-
}
219+
export const DOM_PROPERTIES_MAP = new Map(
220+
DOM_PROPERTIES.map((property) => [property.toLowerCase(), property])
221+
);
224222

225223
/**
226224
* Subset of delegated events which should be passive by default.

0 commit comments

Comments
 (0)