mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-16 03:31:27 -05:00
fix widget window not found error
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@formbricks/js",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.2",
|
||||
"description": "",
|
||||
"source": "src/index.ts",
|
||||
"main": "./dist/index.cjs",
|
||||
|
||||
@@ -54,7 +54,6 @@ const refresh = (): void => {
|
||||
};
|
||||
|
||||
const registerRouteChange = (): void => {
|
||||
console.log("fire!!!");
|
||||
queue.add(async () => {
|
||||
checkInitialized();
|
||||
checkPageUrl();
|
||||
@@ -63,8 +62,4 @@ const registerRouteChange = (): void => {
|
||||
|
||||
const formbricks = { init, setUserId, setEmail, setAttribute, track, logout, refresh, registerRouteChange };
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
(window as any).formbricks = formbricks;
|
||||
}
|
||||
|
||||
export default formbricks;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var b = document.getElementsByTagName("script")[0];
|
||||
b.parentNode.insertBefore(a, b);
|
||||
setTimeout(function () {
|
||||
window.formbricks = window.js;
|
||||
window.formbricks.init({
|
||||
environmentId: "clfqjny0v0003yzgscnog1j9i",
|
||||
apiHost: "http://localhost:3000",
|
||||
|
||||
Reference in New Issue
Block a user