Fix Config::isDefault

Esse commit está contido em:
Nathan Sobo
2014-12-12 10:19:46 -07:00
commit de Max Brunsfeld
commit 3127171b2b
2 arquivos alterados com 5 adições e 4 exclusões
+2 -2
Ver Arquivo
@@ -158,10 +158,10 @@ describe "Config", ->
expect(atom.config.isDefault('foo.changes')).toBe true
expect(Grim.deprecate.callCount).toBe 2
atom.config.set('foo.same', 2)
atom.config.set('foo.same', 1)
atom.config.set('foo.changes', 3)
expect(atom.config.isDefault('foo.same')).toBe false
expect(atom.config.isDefault('foo.same')).toBe true
expect(atom.config.isDefault('foo.changes')).toBe false
expect(Grim.deprecate.callCount).toBe 4
+3 -2
Ver Arquivo
@@ -641,10 +641,11 @@ class Config
Grim.deprecate("Use `not ::get(keyPath, {scope, sources: [atom.config.getUserConfigPath()]})?` instead")
if arguments.length is 1
[keyPath] = arguments
scopeSelector = '*'
else
[scopeSelector, keyPath] = arguments
scope = [scopeSelector]
not @get(keyPath, {scope, sources: [@getUserConfigPath()]})?
not @get(keyPath, {scope: [scopeSelector], sources: [@getUserConfigPath()]})?
# Extended: Retrieve the schema for a specific key path. The schema will tell
# you what type the keyPath expects, and other metadata about the config