diff --git a/spec/config-spec.coffee b/spec/config-spec.coffee index 3ff75e405..3eb05a453 100644 --- a/spec/config-spec.coffee +++ b/spec/config-spec.coffee @@ -44,7 +44,8 @@ describe "Config", -> expect(atom.config.get("x.y", sources: ["a"], scope: [".foo"])).toBe 1 expect(atom.config.get("x.y", sources: ["b"], scope: [".foo"])).toBe 2 expect(atom.config.get("x.y", sources: ["c"], scope: [".foo"])).toBe 3 - expect(atom.config.get("x.y", sources: ["x"], scope: [".foo"])).toBe 4 + # 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() describe "when an 'excludeSources' option is specified", -> it "only retrieves values from the specified sources", -> diff --git a/src/config.coffee b/src/config.coffee index bffd06110..e9e7843fb 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -808,7 +808,7 @@ class Config getRawValue: (keyPath, options) -> value = _.valueForKeyPath(@settings, keyPath) - defaultValue = _.valueForKeyPath(@defaultSettings, keyPath) + defaultValue = _.valueForKeyPath(@defaultSettings, keyPath) unless options?.sources?.length > 0 if value? value = _.deepClone(value)