diff --git a/packages/client/src/sdk.js b/packages/client/src/sdk.js index a0b8aa6719..fefd659986 100644 --- a/packages/client/src/sdk.js +++ b/packages/client/src/sdk.js @@ -1,8 +1,8 @@ import * as API from "./api" import { authStore, routeStore, screenStore, bindingStore } from "./store" import { styleable } from "./utils/styleable" +import { linkable } from "./utils/linkable" import { getAppId } from "./utils/getAppId" -import { link as linkable } from "svelte-spa-router" import DataProvider from "./components/DataProvider.svelte" export default { diff --git a/packages/client/src/utils/linkable.js b/packages/client/src/utils/linkable.js new file mode 100644 index 0000000000..13549e4c5c --- /dev/null +++ b/packages/client/src/utils/linkable.js @@ -0,0 +1,10 @@ +import { get } from "svelte/store" +import { link } from "svelte-spa-router" +import { builderStore } from "../store" + +export const linkable = (node, href) => { + if (get(builderStore).inBuilder) { + return + } + link(node, href) +}