Skip to content

Commit d824731

Browse files
committed
mend
1 parent 756c05d commit d824731

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/cache.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const clearCache = () => {
99
};
1010
clearCache();
1111

12-
const processDefinition = (definition) => {
12+
const mutateDefinition = (definition) => {
1313
const constants = definition.constants;
1414
const computed = definition.computed;
1515

@@ -26,7 +26,7 @@ const processDefinition = (definition) => {
2626
definition.constants = null;
2727
definition.computed = null;
2828

29-
return { styles: definition, constants, computed };
29+
return { constants, computed };
3030
};
3131

3232
const getValueFromStorageObject = (key, object, isConstant, isComputed) => {
@@ -42,7 +42,7 @@ const getValueFromStorageObject = (key, object, isConstant, isComputed) => {
4242
};
4343

4444
export const setInCache = (definition, namespace) => {
45-
const { styles, constants, computed } = processDefinition(definition);
45+
const { constants, computed } = mutateDefinition(definition);
4646
let cache = globalCache;
4747

4848
if (namespace) {
@@ -52,7 +52,7 @@ export const setInCache = (definition, namespace) => {
5252
cache = cache[GLOBAL_KEY];
5353
}
5454

55-
Object.assign(cache, styles);
55+
Object.assign(cache, definition);
5656
Object.assign(cache, {
5757
[CONSTANTS_KEY]: constants,
5858
[COMPUTED_KEY]: computed,

0 commit comments

Comments
 (0)