Skip to content

Commit 12303e1

Browse files
committed
docs: fixed missing branch init
1 parent e701919 commit 12303e1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,11 @@
122122
},
123123
branchInit: function() {
124124
// Branch initialization
125-
if (data['+clicked_branch_link']) {
126-
// read deep link data on click
127-
console.log('Trigger DeepLinkHandler()')
128-
alert('Deep Link Data: ' + JSON.stringify(data))
125+
Branch.initSession(function(data) {
126+
if (data['+clicked_branch_link']) {
127+
// read deep link data on click
128+
alert('Deep Link Data: ' + JSON.stringify(data))
129+
}
129130
});
130131
}
131132
};
@@ -180,9 +181,6 @@
180181

181182
import { TabsPage } from '../pages/tabs/tabs';
182183

183-
// Branch import
184-
declare var Branch;
185-
186184
@Component({
187185
template: `<ion-nav [root]="rootPage"></ion-nav>`
188186
})
@@ -204,6 +202,7 @@
204202
const branchInit = () => {
205203
// only on devices
206204
if (!platform.is('cordova')) { return }
205+
const Branch = window['Branch'];
207206
Branch.initSession(data => {
208207
if (data['+clicked_branch_link']) {
209208
// read deep link data on click

0 commit comments

Comments
 (0)