Skip to content

Commit 1c76133

Browse files
author
Mohsen Azimi
committed
Avoid type mismatch assignment of number to string in HotModuleReplacementPlugin
1 parent 0b1e9d8 commit 1c76133

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎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 (let 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)