Skip to content

Commit 889ef31

Browse files
committed
fix: use-default-on-jsonpath-import
1 parent f7488e1 commit 889ef31

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flagsmith-engine/segments/evaluators.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as jsonpath from 'jsonpath';
1+
import * as jsonpathModule from 'jsonpath';
22
import {
33
GenericEvaluationContext,
44
InSegmentCondition,
@@ -10,6 +10,9 @@ import { getHashedPercentageForObjIds } from '../utils/hashing/index.js';
1010
import { SegmentConditionModel } from './models.js';
1111
import { IS_NOT_SET, IS_SET, PERCENTAGE_SPLIT } from './constants.js';
1212

13+
// Handle ESM/CJS interop - jsonpath exports default in ESM
14+
const jsonpath = (jsonpathModule as any).default || jsonpathModule;
15+
1316
/**
1417
* Returns all segments that the identity belongs to based on segment rules evaluation.
1518
*

0 commit comments

Comments
 (0)