Don't blow up when asking for schema at non-existent path

This commit is contained in:
Kevin Sawicki 2015-01-08 16:05:38 -08:00
parent 5a2c208804
commit 8c39818670
2 changed files with 4 additions and 1 deletions

View File

@ -1060,6 +1060,9 @@ describe "Config", ->
type: 'integer'
default: 12
expect(atom.config.getSchema('foo.baz')).toBeUndefined()
expect(atom.config.getSchema('foo.bar.anInt.baz')).toBeUndefined()
it "respects the schema for scoped settings", ->
schema =
type: 'string'

View File

@ -703,7 +703,7 @@ class Config
schema = @schema
for key in keys
break unless schema?
schema = schema.properties[key]
schema = schema.properties?[key]
schema
# Deprecated: Returns a new {Object} containing all of the global settings and