Skip to content

Commit 7879eef

Browse files
committed
#74 (chore): avoid assignment chaining
1 parent 1ba7096 commit 7879eef

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,11 @@ const makeRegex = (pattern, ignorecase) => {
292292
let source = regexCache[pattern]
293293

294294
if (!source) {
295-
regexCache[pattern] = source = REPLACERS.reduce(
295+
source = REPLACERS.reduce(
296296
(prev, current) => prev.replace(current[0], current[1].bind(pattern)),
297297
pattern
298298
)
299+
regexCache[pattern] = source
299300
}
300301

301302
return ignorecase

0 commit comments

Comments
 (0)