diff --git a/packages/core/src/struct.js b/packages/core/src/struct.js index 37f5447..de3b51f 100644 --- a/packages/core/src/struct.js +++ b/packages/core/src/struct.js @@ -73,6 +73,9 @@ function Structure(meta, fields) { this.fields = fields.slice(0); for (var i = 0; i < fields.length; i++) { this[i] = fields[i] = Immutable.fromJS(fields[i]); + if (this[i] === void 0) { + throw new Error("Structure: cannot contain undefined value at field " + i); + } } }