Skip to content

Commit b55168b

Browse files
committed
Setup order
1 parent 733ca08 commit b55168b

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

injected/src/features/duck-player-native.js

+13-14
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,6 @@ export class DuckPlayerNativeFeature extends ContentFeature {
4949
const comms = new DuckPlayerNativeMessages(this.messaging);
5050
const settings = { selectors };
5151

52-
53-
/** @type {InitialSettings} */
54-
let initialSetup;
55-
56-
// TODO: This seems to get initted twice. Check with Daniel
57-
try {
58-
initialSetup = await comms.initialSetup();
59-
} catch (e) {
60-
console.error(e);
61-
return;
62-
}
63-
64-
console.log('INITIAL SETUP', initialSetup);
65-
6652
comms.subscribeToURLChange(({ pageType }) => {
6753
console.log('GOT PAGE TYPE', pageType);
6854
let next;
@@ -91,6 +77,19 @@ export class DuckPlayerNativeFeature extends ContentFeature {
9177
this.current = next;
9278
}
9379
});
80+
81+
/** @type {InitialSettings} */
82+
let initialSetup;
83+
84+
// TODO: This seems to get initted twice. Check with Daniel
85+
try {
86+
initialSetup = await comms.initialSetup();
87+
} catch (e) {
88+
console.error(e);
89+
return;
90+
}
91+
92+
console.log('INITIAL SETUP', initialSetup);
9493
}
9594
}
9695

0 commit comments

Comments
 (0)