@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.
@@ -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
- const result = this.parseFromRules(strOrEmptyStr, data, rules);
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
  }
@@ -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
- const result = this.parseFromRules(strOrEmptyStr, data, rules);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-mesh/string-interpolation",
3
- "version": "0.5.14",
3
+ "version": "0.5.15",
4
4
  "description": "Dynamic string manipulation",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {