Skip to content

Commit a0567a4

Browse files
committed
Additional comments from PR review.
1 parent 7ffe8e5 commit a0567a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/shared/sdk-server/src/evaluation/Evaluator.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ export default class Evaluator {
160160
* @param state The current evaluation state.
161161
* @param visitedFlags The flags that have been visited during this evaluation.
162162
* This is not part of the state, because it needs to be forked during prerequisite evaluations.
163+
* @param topLevel True when this function is being called in the direct evaluation of a flag,
164+
* versus the evaluataion of a prerequisite.
163165
*/
164166
private _evaluateInternal(
165167
flag: Flag,
@@ -217,6 +219,8 @@ export default class Evaluator {
217219
* @param cb A callback which is executed when prerequisite checks are complete it is called with
218220
* an {@link EvalResult} containing an error result or `undefined` if the prerequisites
219221
* are met.
222+
* @param topLevel True when this function is being called in the direct evaluation of a flag,
223+
* versus the evaluataion of a prerequisite.
220224
*/
221225
private _checkPrerequisites(
222226
flag: Flag,
@@ -287,7 +291,7 @@ export default class Evaluator {
287291
}
288292
return iterCb(true);
289293
},
290-
false,
294+
false, // topLevel false evaluating the prerequisite.
291295
eventFactory,
292296
);
293297
});

0 commit comments

Comments
 (0)