diff --git a/lib/obj.coffee b/lib/obj.coffee index 02bc143..f8ba818 100644 --- a/lib/obj.coffee +++ b/lib/obj.coffee @@ -17,6 +17,9 @@ parsedsc = (text, name) -> # An object cannot be in several locations at once, you must clone the variable. class SaletObj constructor: (spec) -> + unless spec.name? + console.error("Trying to create an object with no name") + return null for key, value of spec this[key] = value level: 0