Skip to content

Commit 62a56d9

Browse files
eeynardguyca
authored andcommitted
Add possibility to pass payload through handleDeepLink (wix#1128)
Add payload param to handleDeepLink
1 parent 763b26d commit 62a56d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Navigation.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,14 @@ function clearEventHandler(navigatorEventID) {
148148
}
149149

150150
function handleDeepLink(params = {}) {
151-
if (!params.link) return;
151+
const { link, payload } = params;
152+
153+
if (!link) return;
154+
152155
const event = {
153156
type: 'DeepLink',
154-
link: params.link
157+
link,
158+
...(payload ? { payload } : {})
155159
};
156160
for (let i in _allNavigatorEventHandlers) {
157161
_allNavigatorEventHandlers[i](event);

0 commit comments

Comments
 (0)