Setting value to null/undefined removes key from config

This commit is contained in:
Corey Johnson & Nathan Sobo
2013-04-25 17:52:29 -07:00
committed by Corey Johnson & Kevin Sawicki
parent c923b561e2
commit 1b98bf706e
2 changed files with 9 additions and 1 deletions

View File

@@ -139,7 +139,10 @@ _.mixin
key = keys.shift()
object[key] ?= {}
object = object[key]
object[keys.shift()] = value
if value?
object[keys.shift()] = value
else
delete object[keys.shift()]
compactObject: (object) ->
newObject = {}