Skip to content

Commit b33bbcd

Browse files
authored
chore: fix serviceworker registration for gh-pages (#72)
1 parent 1dc1a06 commit b33bbcd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/e2e/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ $("[data-action=setup]")
2222
});
2323

2424
$("#registerForWebPush")
25-
.click(() => Leanplum.registerForWebPush().then(refreshWebPush));
25+
.click(() => {
26+
const swLocation = window.origin + window.pathname + "/sw.min.js";
27+
Leanplum.registerForWebPush(swLocation).then(refreshWebPush);
28+
});
2629

2730
$("#unregisterFromWebPush")
2831
.click(() => Leanplum.unregisterFromWebPush().then(refreshWebPush));

0 commit comments

Comments
 (0)