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({ registerHooks({
autoreg$accept: (type, M) => { autoreg$accept: (type, M) => {
if ('trait' === type) {
const {default: Trait} = M; const {default: Trait} = M;
typeTo.set(Trait.type(), Trait); typeTo.set(Trait.type(), Trait);
traitTo.set(Trait, M); traitTo.set(Trait, M);
}
}, },
}, '@avocado/entity/trait/registrar'); }, '@avocado/entity/trait/registrar');