posthog-node 5.8.6 → 5.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1189,7 +1189,7 @@ function snipLine(line, colno) {
1189
1189
  return newLine;
1190
1190
  }
1191
1191
 
1192
- var version = "5.8.6";
1192
+ var version = "5.8.7";
1193
1193
 
1194
1194
  /**
1195
1195
  * A lazy value that is only computed when needed. Inspired by C#'s Lazy<T> class.
@@ -1549,22 +1549,7 @@ class FeatureFlagsPoller {
1549
1549
  const flagConditions = flagFilters.groups || [];
1550
1550
  let isInconclusive = false;
1551
1551
  let result = undefined;
1552
- // # Stable sort conditions with variant overrides to the top. This ensures that if overrides are present, they are
1553
- // # evaluated first, and the variant override is applied to the first matching condition.
1554
- const sortedFlagConditions = [...flagConditions].sort((conditionA, conditionB) => {
1555
- const AHasVariantOverride = !!conditionA.variant;
1556
- const BHasVariantOverride = !!conditionB.variant;
1557
- if (AHasVariantOverride && BHasVariantOverride) {
1558
- return 0;
1559
- } else if (AHasVariantOverride) {
1560
- return -1;
1561
- } else if (BHasVariantOverride) {
1562
- return 1;
1563
- } else {
1564
- return 0;
1565
- }
1566
- });
1567
- for (const condition of sortedFlagConditions) {
1552
+ for (const condition of flagConditions) {
1568
1553
  try {
1569
1554
  if (await this.isConditionMatch(flag, distinctId, condition, properties, evaluationCache)) {
1570
1555
  const variantOverride = condition.variant;