cx 25.1.2 → 25.2.0

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/data.js CHANGED
@@ -466,7 +466,7 @@ function stringTemplate(str) {
466
466
  break;
467
467
  }
468
468
  }
469
- if (quoteStart < str.length) expr = plus(expr) + quoteStr(str.substring(quoteStart));
469
+ if (quoteStart < str.length || expr.length == 0) expr = plus(expr) + quoteStr(str.substring(quoteStart));
470
470
  return (tplCache[str] = expression(expr));
471
471
  }
472
472
  var StringTemplate = {
@@ -1232,7 +1232,7 @@ function getSelector(config) {
1232
1232
 
1233
1233
  //toString converts accessor chains to binding paths
1234
1234
  if (config.bind) return Binding.get(config.bind.toString()).value;
1235
- if (config.tpl) return StringTemplate.get(config.tpl);
1235
+ if (isString(config.tpl)) return StringTemplate.get(config.tpl);
1236
1236
  if (config.expr) return Expression.get(config.expr);
1237
1237
  if (config.get) return config.get;
1238
1238
  var selectors = {};
@@ -1285,7 +1285,7 @@ function getSelectorConfig(props, values, nameMap) {
1285
1285
  } else if (v.get) {
1286
1286
  functions[p] = v.get;
1287
1287
  constant = false;
1288
- } else if (v.tpl) {
1288
+ } else if (isString(v.tpl)) {
1289
1289
  functions[p] = StringTemplate.get(v.tpl);
1290
1290
  constant = false;
1291
1291
  } else if (pv && typeof pv == "object" && pv.structured) {