⚡ Remove non-null assertions for Db collections (#3111)
* 📘 Remove unions to `null` * ⚡ Track `Db` initialization state * 🔥 Remove non-null assertions * 👕 Remove lint exceptions * 🔥 Remove leftover assertion
This commit is contained in:
@@ -165,8 +165,8 @@ export async function generateUniqueName(
|
||||
|
||||
const found: Array<WorkflowEntity | ICredentialsDb> =
|
||||
entityType === 'workflow'
|
||||
? await Db.collections.Workflow!.find(findConditions)
|
||||
: await Db.collections.Credentials!.find(findConditions);
|
||||
? await Db.collections.Workflow.find(findConditions)
|
||||
: await Db.collections.Credentials.find(findConditions);
|
||||
|
||||
// name is unique
|
||||
if (found.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user