Return a cloned object from config.get()

This prevents mutations to the values of the default settings.
This commit is contained in:
Kevin Sawicki & Nathan Sobo
2013-05-16 10:27:51 -07:00
parent 097ee9f2a9
commit 2b49a04227
6 changed files with 45 additions and 27 deletions

View File

@@ -48,11 +48,6 @@ the following way:
```coffeescript
# basic key update
config.set("core.autosave", true)
# if you mutate a config key, you'll need to call `config.update` to inform
# observers of the change
config.get("fuzzyFinder.ignoredPaths").push "vendor"
config.update()
```
You can also use `setDefaults`, which will assign default values for keys that