Skip to content

Commit

Permalink
Prefer for...of instead of forEach.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkondratek committed Nov 6, 2024
1 parent 77a8f15 commit 6a20adb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vscode/src/context/openctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,21 +219,21 @@ function getMergeConfigurationFunction(
const providers: OpenCtxClientConfiguration['providers'] = {}
// 1. Viewer settings (lowest priority)
if (viewerSettingsProviders) {
Object.entries(viewerSettingsProviders).forEach(([k, v]) => {
for (const [k, v] of Object.entries(viewerSettingsProviders)) {
providers[k] = v
})
}
}
// 2. Configuration providers (middle priority)
if (configuration.providers) {
Object.entries(configuration.providers).forEach(([k, v]) => {
for (const [k, v] of Object.entries(configuration.providers)) {
providers[k] = v
})
}
}
// 3. Local settings (highest priority)
if (localSettingsProviders) {
Object.entries(localSettingsProviders).forEach(([k, v]) => {
for (const [k, v] of Object.entries(localSettingsProviders)) {
providers[k] = v
})
}
}

return {
Expand Down

0 comments on commit 6a20adb

Please sign in to comment.