diff --git a/spec/config-spec.coffee b/spec/config-spec.coffee index 02a33bcf2..5ed2ee291 100644 --- a/spec/config-spec.coffee +++ b/spec/config-spec.coffee @@ -47,6 +47,8 @@ describe "Config", -> # Schema defaults never match a specific source. We could potentially add a special "schema" source. expect(atom.config.get("x.y", sources: ["x"], scope: [".foo"])).toBeUndefined() + expect(atom.config.get(null, sources: ['a'], scope: [".foo"]).x.y).toBe 1 + describe "when an 'excludeSources' option is specified", -> it "only retrieves values from the specified sources", -> atom.config.set("x.y", 1, scopeSelector: ".foo", source: "a") diff --git a/src/config.coffee b/src/config.coffee index e9e7843fb..8ddaa3739 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -457,7 +457,7 @@ class Config # file in the type specified by the configuration schema. get: -> if arguments.length > 1 - if typeof arguments[0] is 'string' + if typeof arguments[0] is 'string' or not arguments[0]? keyPath = arguments[0] options = arguments[1] {scope} = options