refactor: reuse context
This commit is contained in:
parent
953141093b
commit
59b902753e
|
@ -42,7 +42,11 @@ export default (latus) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
static createContext(locals = {}) {
|
static createContext(locals = {}) {
|
||||||
|
if (locals.__populated) {
|
||||||
|
return locals;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
|
__populated: true,
|
||||||
...latus.get('%behaviorGlobals'),
|
...latus.get('%behaviorGlobals'),
|
||||||
...locals,
|
...locals,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user