Skip to content

Commit

Permalink
Merge pull request #1760 from krethan/master
Browse files Browse the repository at this point in the history
Fix error when referencing undefined parameters variable
  • Loading branch information
worksofliam authored Jan 10, 2024
2 parents 3e1bb17 + 5966e6b commit e3569b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ If you want to help but you're unsure what to work on, here are two easy places

Thanks so much to everyone [who has contributed](https://github.com/codefori/vscode-ibmi/graphs/contributors).

* [@krethan](https://github.com/krethan)
* [@connorholyday](https://github.com/connorholyday)
* [@worksofliam](https://github.com/worksofliam)
* [@alanseiden](https://github.com/alanseiden)
Expand Down
10 changes: 6 additions & 4 deletions src/api/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ export namespace ConnectionConfiguration {
}

export async function update(parameters: Parameters) {
let connections = getConnectionSettings();
connections.filter(conn => conn.name === parameters.name).forEach(conn => Object.assign(conn, parameters));
await updateAll(connections);
if(parameters?.name) {
const connections = getConnectionSettings();
connections.filter(conn => conn.name === parameters.name).forEach(conn => Object.assign(conn, parameters));
await updateAll(connections);
}
}

/**
Expand All @@ -171,4 +173,4 @@ export namespace ConnectionConfiguration {

return config;
}
}
}

0 comments on commit e3569b6

Please sign in to comment.