mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-06 23:26:25 +03:00
Don't blow up when asking for schema at non-existent path
This commit is contained in:
parent
5a2c208804
commit
8c39818670
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user