fix: guard against empty adds

This commit is contained in:
cha0s 2020-06-25 09:52:57 -05:00
parent a7b34bfcd1
commit 83ca91d3b8

View File

@ -19,8 +19,10 @@ export default class Context {
} }
add(key, value, type = 'undefined') { add(key, value, type = 'undefined') {
if (key) {
this.map.set(key, [value, type]); this.map.set(key, [value, type]);
} }
}
addObjectMap(map) { addObjectMap(map) {
Object.entries(map) Object.entries(map)