Skip to content

Commit

Permalink
fix: unique library list entries filter
Browse files Browse the repository at this point in the history
  • Loading branch information
janfh committed Jan 14, 2025
1 parent be01154 commit 7916384
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/connection/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class SQLJobManager {
const config = instance.getConfig();

const newJob = predefinedJob || (new OldSQLJob({
libraries: uniqueStrings([config.currentLibrary, ...config.libraryList]),
libraries: [config.currentLibrary, ...config.libraryList].filter((item, index, arr) => arr.indexOf(item) === index),
naming: `system`,
"full open": false,
"transaction isolation": "none",
Expand Down Expand Up @@ -162,9 +162,3 @@ export class SQLJobManager {
return Configuration.get<SelfValue>(`jobSelfDefault`) || `*NONE`;
}
}

const uniqueStrings = (arr: string[]): string[] => {
return arr.filter((item,
index) => arr.indexOf(item) === index);
}

0 comments on commit 7916384

Please sign in to comment.