is plain object

This commit is contained in:
Ben Ogle 2014-09-25 17:39:06 -07:00
parent ef19e925e9
commit 4e1d13ceea

View File

@ -604,7 +604,7 @@ class Config
@emitter.emit 'did-change'
setSchema: (keyPath, schema) ->
unless typeof schema is "object"
unless isPlainObject(schema)
throw new Error("Error loading schema for #{keyPath}: schemas can only be objects!")
unless typeof schema.type?