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:
Phil Pluckthun
2019-05-03 15:51:35 +01:00
committed by Evan Jacobs
parent cc5f20907e
commit fff5c1e4ab

View File

@@ -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;
}
}