@graphql-mesh/string-interpolation 0.5.2 → 0.5.3-alpha-20231025114425-132b8cb9e
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/cjs/interpolator.js +1 -1
- package/esm/interpolator.js +1 -1
- package/package.json +1 -1
package/cjs/interpolator.js
CHANGED
|
@@ -99,7 +99,7 @@ class Interpolator {
|
|
|
99
99
|
}
|
|
100
100
|
applyRule(str, rule, data = {}) {
|
|
101
101
|
const dataToReplace = this.applyData(rule.key, data);
|
|
102
|
-
if (dataToReplace) {
|
|
102
|
+
if (dataToReplace !== undefined) {
|
|
103
103
|
return str.replace(rule.replace, this.applyModifiers(rule.modifiers, dataToReplace, data));
|
|
104
104
|
}
|
|
105
105
|
else if (rule.alternativeText) {
|
package/esm/interpolator.js
CHANGED
|
@@ -95,7 +95,7 @@ export class Interpolator {
|
|
|
95
95
|
}
|
|
96
96
|
applyRule(str, rule, data = {}) {
|
|
97
97
|
const dataToReplace = this.applyData(rule.key, data);
|
|
98
|
-
if (dataToReplace) {
|
|
98
|
+
if (dataToReplace !== undefined) {
|
|
99
99
|
return str.replace(rule.replace, this.applyModifiers(rule.modifiers, dataToReplace, data));
|
|
100
100
|
}
|
|
101
101
|
else if (rule.alternativeText) {
|