Skip to content

Commit

Permalink
chore: prefer set to array
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Jun 30, 2022
1 parent aa56d34 commit b68c4a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/client/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (import.meta.hot) {

const parser = new DOMParser();

const KNOWN_MANUAL_HMR_EXTENSIONS = ['.astro', '.md', '.mdx'];
const KNOWN_MANUAL_HMR_EXTENSIONS = new Set(['.astro', '.md', '.mdx']);
function needsManualHMR(path: string) {
for (const ext of KNOWN_MANUAL_HMR_EXTENSIONS.values()) {
if (path.endsWith(ext)) return true;
Expand Down

0 comments on commit b68c4a9

Please sign in to comment.