@naturalcycles/abba 1.15.3 → 1.15.4

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/dist/util.js CHANGED
@@ -113,9 +113,9 @@ exports.segmentationRuleMap = {
113
113
  [types_1.SegmentationRuleOperator.Boolean](keyValue, ruleValue) {
114
114
  // If it's true, then must be true
115
115
  if (ruleValue === 'true')
116
- return keyValue === 'true';
116
+ return keyValue?.toString() === 'true';
117
117
  // Anything else cannot be true
118
- return keyValue !== 'true';
118
+ return keyValue?.toString() !== 'true';
119
119
  },
120
120
  // Deprecated
121
121
  [types_1.SegmentationRuleOperator.Equals]: (keyValue, ruleValue) => keyValue === ruleValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/abba",
3
- "version": "1.15.3",
3
+ "version": "1.15.4",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build": "build",
package/src/util.ts CHANGED
@@ -131,9 +131,9 @@ export const segmentationRuleMap: Record<SegmentationRuleOperator, SegmentationR
131
131
  },
132
132
  [SegmentationRuleOperator.Boolean](keyValue, ruleValue) {
133
133
  // If it's true, then must be true
134
- if (ruleValue === 'true') return keyValue === 'true'
134
+ if (ruleValue === 'true') return keyValue?.toString() === 'true'
135
135
  // Anything else cannot be true
136
- return keyValue !== 'true'
136
+ return keyValue?.toString() !== 'true'
137
137
  },
138
138
  // Deprecated
139
139
  [SegmentationRuleOperator.Equals]: (keyValue, ruleValue) => keyValue === ruleValue,