From 60eb1d23bd330ed92e335b91032f9148c1fd9020 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Mon, 29 Apr 2024 12:01:41 +0100 Subject: [PATCH] Explicit comparison --- grafast/grafast/src/engine/executeBucket.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/grafast/grafast/src/engine/executeBucket.ts b/grafast/grafast/src/engine/executeBucket.ts index b9ff4c46f6..1c791defe4 100644 --- a/grafast/grafast/src/engine/executeBucket.ts +++ b/grafast/grafast/src/engine/executeBucket.ts @@ -603,7 +603,6 @@ export function executeBucket( let forceIndexValue: GrafastError | null | undefined = undefined; let rejectValue: GrafastError | null | undefined = undefined; let indexFlags: ExecutionEntryFlags = NO_FLAGS; - // for (const $dep of step.dependencies) { for (let i = 0, l = step.dependencies.length; i < l; i++) { const $dep = step.dependencies[i]; const forbiddenFlags = step.dependencyForbiddenFlags[i]; @@ -622,7 +621,7 @@ export function executeBucket( // If dep is inhibited and we do allow inhibited, but we're disallowed, use our onReject. // If dep is not inhibited, but we're disallowed, use our onReject. if ( - onReject && + onReject !== undefined && (disallowedFlags & (FLAG_INHIBITED | FLAG_ERROR)) === NO_FLAGS ) { rejectValue ||= onReject; @@ -856,7 +855,7 @@ export function executeBucket( // If dep is inhibited and we do allow inhibited, but we're disallowed, use our onReject. // If dep is not inhibited, but we're disallowed, use our onReject. if ( - onReject && + onReject !== undefined && (disallowedFlags & (FLAG_INHIBITED | FLAG_ERROR)) === NO_FLAGS ) { rejectValue ||= onReject;