fix: undefined req

This commit is contained in:
cha0s 2020-12-17 00:18:36 -06:00
parent b811009a77
commit 3fee3690b5

View File

@ -3,9 +3,12 @@ import {ensureUniqueReduction} from '@latus/core';
export default {
hooks: {
'@latus/http/plugins': async (req, latus) => ({
'@reddichat/state/client': {
defaultState: await ensureUniqueReduction(latus, '@reddichat/state/defaultState', req),
},
'@reddichat/state/client': req
? {
defaultState: await ensureUniqueReduction(latus, '@reddichat/state/defaultState', req),
}
: {}
,
}),
},
};