@graphql-mesh/string-interpolation 0.5.14 → 0.5.15
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 -8
- package/esm/interpolator.js +1 -8
- package/package.json +1 -1
package/cjs/interpolator.js
CHANGED
|
@@ -91,14 +91,7 @@ class Interpolator {
|
|
|
91
91
|
const strOrEmptyStr = str || '';
|
|
92
92
|
const rules = this.parseRules(strOrEmptyStr);
|
|
93
93
|
if (rules && rules.length > 0) {
|
|
94
|
-
|
|
95
|
-
if (rules.length === 1 &&
|
|
96
|
-
result === '' &&
|
|
97
|
-
strOrEmptyStr.startsWith('{') &&
|
|
98
|
-
strOrEmptyStr.endsWith('}')) {
|
|
99
|
-
return undefined;
|
|
100
|
-
}
|
|
101
|
-
return result;
|
|
94
|
+
return this.parseFromRules(strOrEmptyStr, data, rules);
|
|
102
95
|
}
|
|
103
96
|
return str;
|
|
104
97
|
}
|
package/esm/interpolator.js
CHANGED
|
@@ -87,14 +87,7 @@ export class Interpolator {
|
|
|
87
87
|
const strOrEmptyStr = str || '';
|
|
88
88
|
const rules = this.parseRules(strOrEmptyStr);
|
|
89
89
|
if (rules && rules.length > 0) {
|
|
90
|
-
|
|
91
|
-
if (rules.length === 1 &&
|
|
92
|
-
result === '' &&
|
|
93
|
-
strOrEmptyStr.startsWith('{') &&
|
|
94
|
-
strOrEmptyStr.endsWith('}')) {
|
|
95
|
-
return undefined;
|
|
96
|
-
}
|
|
97
|
-
return result;
|
|
90
|
+
return this.parseFromRules(strOrEmptyStr, data, rules);
|
|
98
91
|
}
|
|
99
92
|
return str;
|
|
100
93
|
}
|