@orderingstack/front-hooks 0.0.3 → 0.0.4

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.es.js CHANGED
@@ -8077,7 +8077,7 @@ function useCms(id, intervalSeconds = 600, baseUrl, tenant) {
8077
8077
  if (!baseUrl || !tenant) {
8078
8078
  throw new Error("baseUrl or tenant was not provided");
8079
8079
  }
8080
- const url = `${baseUrl}/cms-api/content/${tenant}/${id}`;
8080
+ const url = `${baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl}/cms-api/content/${tenant}/${id}`;
8081
8081
  const [state, setState] = useState(null);
8082
8082
  const [error, setError] = useState(false);
8083
8083
  function getCms() {