refactor: Add lint rule for unsafe property access with lodash get/set (no-changelog) (#8587)

This commit is contained in:
Elias Meire
2024-02-08 15:32:04 +01:00
committed by GitHub
parent 8e392cfc1d
commit de6d466e5e
22 changed files with 90 additions and 71 deletions

View File

@@ -48,9 +48,7 @@ export async function customerIoApiRequest(
export function eventExists(currentEvents: string[], webhookEvents: IDataObject) {
for (const currentEvent of currentEvents) {
if (
get(webhookEvents, `${currentEvent.split('.')[0]}.${currentEvent.split('.')[1]}`) !== true
) {
if (get(webhookEvents, [currentEvent.split('.')[0], currentEvent.split('.')[1]]) !== true) {
return false;
}
}