Fix Config::isDefault
Esse commit está contido em:
@@ -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
@@ -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
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário