Skip to content

Commit 13ac6a1

Browse files
authored
Merge pull request webpack#7020 from mohsen1/avoid-type-mismatch-assignments
Avoid type mismatch assignment of number to string in HotModuleReplacementPlugin
2 parents 0b1e9d8 + 581d19b commit 13ac6a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/HotModuleReplacementPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ module.exports = class HotModuleReplacementPlugin {
145145
h: compilation.hash,
146146
c: {}
147147
};
148-
for (let chunkId of Object.keys(records.chunkHashs)) {
149-
chunkId = isNaN(+chunkId) ? chunkId : +chunkId;
148+
for (const key of Object.keys(records.chunkHashs)) {
149+
const chunkId = isNaN(+key) ? key : +key;
150150
const currentChunk = compilation.chunks.find(
151151
chunk => chunk.id === chunkId
152152
);

0 commit comments

Comments
 (0)