@weaverse/hydrogen 5.11.0 → 5.11.1

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
@@ -48,12 +48,12 @@ function getNestedKey(obj, path, fallback) {
48
48
  return fallback;
49
49
  }
50
50
  function interpolate(template, variables) {
51
- if (!variables || Object.keys(variables).length === 0) {
51
+ if (!variables) {
52
52
  return template;
53
53
  }
54
54
  return template.replace(/\{\{(\w+)\}\}/g, (match, key) => {
55
55
  const value = variables[key];
56
- return value !== void 0 ? String(value) : match;
56
+ return value === void 0 ? match : String(value);
57
57
  });
58
58
  }
59
59
  var ThemeTextContext = createContext(null);
@@ -1097,7 +1097,7 @@ var WeaverseClient = class {
1097
1097
  type: typeof result,
1098
1098
  isString: typeof result === "string",
1099
1099
  length: typeof result === "string" ? result.length : "N/A",
1100
- preview: typeof result === "string" ? `${result.substring(0, 50)}...` : String(result)
1100
+ preview: typeof result === "string" ? `${result.slice(0, 50)}...` : String(result)
1101
1101
  }
1102
1102
  );
1103
1103
  result = { theme: defaultThemeSettings };