Skip to content

Commit 0261411

Browse files
committed
fix: set service worker path for web push during migration
1 parent b7d1004 commit 0261411

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/LeanplumInternal.ts

+3
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,14 @@ export default class LeanplumInternal {
8989

9090
this._events.on('webPushSubscribed',
9191
() => {
92+
const serviceWorkerPath = this._webPushOptions?.serviceWorkerUrl
93+
const path = serviceWorkerPath ? { serviceWorkerPath } : {}
9294
this._ct && this._ct.notifications.push({
9395
titleText: '',
9496
bodyText: '',
9597
okButtonText: '',
9698
rejectButtonText: '',
99+
...path,
97100
})
98101
})
99102
}

0 commit comments

Comments
 (0)