mirror of
https://github.com/atom/atom.git
synced 2026-02-16 09:35:54 -05:00
Write empty object values on same line as keys
This commit is contained in:
@@ -94,7 +94,10 @@ module.exports =
|
||||
else if _.isArray(value)
|
||||
cson += " #{@stringifyArray(value, indentLevel)}"
|
||||
else if _.isObject(value)
|
||||
cson += "\n#{@stringifyObject(value, indentLevel + 2)}"
|
||||
if _.isEmpty(value)
|
||||
cson += ' {}'
|
||||
else
|
||||
cson += "\n#{@stringifyObject(value, indentLevel + 2)}"
|
||||
else
|
||||
throw new Error("Unrecognized value type for key: #{key} with value: #{value}")
|
||||
prefix = '\n'
|
||||
|
||||
Reference in New Issue
Block a user