fix: addTrait default to empty json

This commit is contained in:
cha0s 2019-03-20 23:00:42 -05:00
parent 30e286b68c
commit 03dcc84ca0

View File

@ -63,7 +63,7 @@ export class Traits {
return Object.keys(this.traits_PRIVATE);
}
addTrait(type, json) {
addTrait(type, json = {}) {
if (this.hasTrait(type)) {
debug(`Tried to add trait "${type}" when it already exists!`);
return;