mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Don't blow up when asking for schema at non-existent path
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user