update comments for getAll

This commit is contained in:
Philip Weiss
2018-02-24 18:16:47 -08:00
parent 6eee51be7e
commit 20203b798c

View File

@@ -628,16 +628,18 @@ class Config {
const priorities = []
// Priority level for atom project settings.
// getAll returns all values that would normally be returned
// through get for the given keypath. Since project settings layers
// on top of the normal config, if there is a conflict, the one
// with higher priority (ie: project settings) should be returned first.
priorities.unshift({options})
if (this.hasCurrentProject) {
options.scope = (!Array.isArray(scope)) ? [PROJECT] : scope.push(PROJECT)
options.sources = (options.sources == null ? [PROJECT] : options.sources.push(PROJECT))
priorities.push({ options, source: PROJECT })
priorities.unshift({ options, source: PROJECT })
}
// Priority level for atom global settings.
priorities.push({options})
for (let priority of priorities) {
result = this.getAllForPriority(keyPath, priority)
if (result.length > 0) {