8000 `_.uniqueId` requires `toString` for its prefix. (#95) · sarvex/lodash-webpack-plugin@3833174 · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 3833174

Browse files
michellejdalton
authored andcommitted
_.uniqueId requires toString for its prefix. (lodash#95)
Without `toString`, running `_.uniqueId()` on an optimized build puts an `undefined` prefix through `identity`. `undefined + number` then turns into `NaN`. An alternative fix that will simplify this (in lodash) is to not use `toString` on prefix unless a prefix is supplied.
1 parent 5bd1c22 commit 3833174

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mapping.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export const overrides = {
164164
'union': { 'flattening': true },
165165
'unionBy': { 'flattening': true },
166166
'unionWith': { 'flattening': true },
167+
'uniqueId': { 'coercions': true },
167168
'upperCase': { 'unicode': true },
168169
'xor': { 'flattening': true },
169170
'xorBy': { 'flattening': true },

0 commit comments

Comments
 (0)
0