@oddo/lang 0.0.14 → 0.0.16

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/index.mjs CHANGED
@@ -3004,7 +3004,9 @@ function convertTemplateLiteralFromToken(token) {
3004
3004
  if (braceDepth === 0) {
3005
3005
  const exprText = text.substring(exprStart, pos);
3006
3006
  try {
3007
+ const savedSourceText = sourceText;
3007
3008
  const exprAST = parseOddoExpression(exprText);
3009
+ sourceText = savedSourceText;
3008
3010
  expressions.push(exprAST);
3009
3011
  } catch (e) {
3010
3012
  expressions.push({
@@ -3711,7 +3713,7 @@ function createReactiveExpr(oddoExpr, valueExpr, attrExpression = false) {
3711
3713
  const identifiers = allIdentifiers.filter((id) => isReactive(id));
3712
3714
  const pragma = attrExpression ? "computed" : "x";
3713
3715
  if (identifiers.length === 0) {
3714
- if (t.isLiteral(valueExpr)) {
3716
+ if (attrExpression || t.isLiteral(valueExpr)) {
3715
3717
  return valueExpr;
3716
3718
  }
3717
3719
  usedModifiers.add(pragma);
@@ -4778,7 +4780,7 @@ function convertArrowFunction2(expr) {
4778
4780
  body = null;
4779
4781
  }
4780
4782
  currentScope = savedScope;
4781
- if (reactiveDepsForBody.length > 0 || params.length > 0 && inReactiveScope) {
4783
+ if (reactiveDepsForBody.length > 0) {
4782
4784
  usedModifiers.add("liftFn");
4783
4785
  const depParams = reactiveDepsForBody.map((id) => t.identifier(id));
4784
4786
  const allParams = [...depParams, ...params];