mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 23:48:05 +03:00
isPlainObject
This commit is contained in:
parent
3a8f842de3
commit
fcf2143e70
@ -624,7 +624,7 @@ class Config
|
||||
extractDefaultsFromSchema: (schema) ->
|
||||
if schema.default?
|
||||
schema.default
|
||||
else if schema.type is 'object' and schema.properties? and typeof schema.properties is "object"
|
||||
else if schema.type is 'object' and schema.properties? and isPlainObject(schema.properties)
|
||||
defaults = {}
|
||||
properties = schema.properties or {}
|
||||
defaults[key] = @extractDefaultsFromSchema(value) for key, value of properties
|
||||
|
Loading…
Reference in New Issue
Block a user