mirror of
https://github.com/zhigang1992/styled-components.git
synced 2026-04-28 17:25:54 +08:00
Add indices to dynamic hashes in ComponentStyle
When the same interpolations swap places they still produce the same hash which can sometimes lead to the same hash. Unlikely but it does happen.
This commit is contained in:
committed by
Evan Jacobs
parent
cc5f20907e
commit
fff5c1e4ab
@@ -73,7 +73,7 @@ export default class ComponentStyle {
|
||||
} else {
|
||||
const partChunk = flatten(partRule, executionContext, styleSheet);
|
||||
const partString = Array.isArray(partChunk) ? partChunk.join('') : partChunk;
|
||||
dynamicHash ^= hash(partString);
|
||||
dynamicHash ^= hash(partString + i);
|
||||
css += partString;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user