fix: only accept trait updates

This commit is contained in:
cha0s 2020-06-26 00:27:53 -05:00
parent cf44d3609f
commit 7901079054

View File

@ -38,9 +38,11 @@ export function lookupTrait(type) {
registerHooks({
autoreg$accept: (type, M) => {
const {default: Trait} = M;
typeTo.set(Trait.type(), Trait);
traitTo.set(Trait, M);
if ('trait' === type) {
const {default: Trait} = M;
typeTo.set(Trait.type(), Trait);
traitTo.set(Trait, M);
}
},
}, '@avocado/entity/trait/registrar');