@featurevisor/sdk 1.29.2 → 1.30.1

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.
package/src/feature.ts CHANGED
@@ -33,7 +33,7 @@ export function getMatchedTraffic(
33
33
  datafileReader: DatafileReader,
34
34
  logger: Logger,
35
35
  ): Traffic | undefined {
36
- return traffic.find((t) => {
36
+ const matchedTraffic = traffic.find((t) => {
37
37
  if (
38
38
  !allGroupSegmentsAreMatched(
39
39
  parseFromStringifiedSegments(t.segments),
@@ -47,6 +47,12 @@ export function getMatchedTraffic(
47
47
 
48
48
  return true;
49
49
  });
50
+
51
+ if (matchedTraffic && matchedTraffic.percentage > 0) {
52
+ return matchedTraffic;
53
+ }
54
+
55
+ return;
50
56
  }
51
57
 
52
58
  export interface MatchedTrafficAndAllocation {
package/src/index.ts CHANGED
@@ -3,3 +3,4 @@ export * from "./instance";
3
3
  export * from "./logger";
4
4
  export * from "./conditions";
5
5
  export * from "./emitter";
6
+ export * from "./evaluate";