perf: Make frontend linting faster (no-changelog) (#7717)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -37,17 +37,18 @@ export const useExternalSecretsStore = defineStore('externalSecrets', () => {
|
||||
secretAcc[secret] = '*********';
|
||||
return secretAcc;
|
||||
}
|
||||
const obj = (secretAcc[splitSecret[0]] ?? {}) as object;
|
||||
let acc: any = obj;
|
||||
const obj = secretAcc[splitSecret[0]] ?? {};
|
||||
let acc = obj;
|
||||
for (let i = 1; i < splitSecret.length; i++) {
|
||||
const key = splitSecret[i];
|
||||
const key = splitSecret[i] as keyof typeof acc;
|
||||
// Actual value key
|
||||
if (i === splitSecret.length - 1) {
|
||||
acc[key] = '*********';
|
||||
const key = splitSecret[i] as keyof typeof acc;
|
||||
acc[key] = '*********' as (typeof acc)[typeof key];
|
||||
continue;
|
||||
}
|
||||
if (!(key in acc)) {
|
||||
acc[key] = {};
|
||||
if (Object.keys(acc) && !acc[key]) {
|
||||
acc[key] = {} as (typeof acc)[typeof key];
|
||||
}
|
||||
acc = acc[key];
|
||||
}
|
||||
|
||||
@@ -750,16 +750,14 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
}
|
||||
|
||||
// Check if the same connection exists already
|
||||
const checkProperties = ['index', 'node', 'type'];
|
||||
let propertyName: string;
|
||||
const checkProperties = ['index', 'node', 'type'] as Array<keyof IConnection>;
|
||||
let propertyName: keyof IConnection;
|
||||
let connectionExists = false;
|
||||
connectionLoop: for (const existingConnection of this.workflow.connections[sourceData.node][
|
||||
sourceData.type
|
||||
][sourceData.index]) {
|
||||
for (propertyName of checkProperties) {
|
||||
if (
|
||||
(existingConnection as any)[propertyName] !== (destinationData as any)[propertyName]
|
||||
) {
|
||||
if (existingConnection[propertyName] !== destinationData[propertyName]) {
|
||||
continue connectionLoop;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user