Skip to content

Commit 7916384

Browse files
committed
fix: unique library list entries filter
1 parent be01154 commit 7916384

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/connection/manager.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class SQLJobManager {
3030
const config = instance.getConfig();
3131

3232
const newJob = predefinedJob || (new OldSQLJob({
33-
libraries: uniqueStrings([config.currentLibrary, ...config.libraryList]),
33+
libraries: [config.currentLibrary, ...config.libraryList].filter((item, index, arr) => arr.indexOf(item) === index),
3434
naming: `system`,
3535
"full open": false,
3636
"transaction isolation": "none",
@@ -162,9 +162,3 @@ export class SQLJobManager {
162162
return Configuration.get<SelfValue>(`jobSelfDefault`) || `*NONE`;
163163
}
164164
}
165-
166-
const uniqueStrings = (arr: string[]): string[] => {
167-
return arr.filter((item,
168-
index) => arr.indexOf(item) === index);
169-
}
170-

0 commit comments

Comments
 (0)