Skip to content

Commit de9f22b

Browse files
committed
Warn (instead of error) on Duck Player returning early
1 parent 43af7b8 commit de9f22b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ export class DuckPlayerNativeFeature extends ContentFeature {
3232

3333
const selectors = this.getFeatureSetting('selectors');
3434
console.log('DUCK PLAYER NATIVE SELECTORS', selectors); // TODO: REMOVE
35+
if (!selectors) {
36+
console.warn('No selectors found. Check remote config. Feature will not be initialized.');
37+
return;
38+
}
3539

3640
const locale = args?.locale || args?.language || 'en';
3741
const env = new Environment({
@@ -60,7 +64,7 @@ export class DuckPlayerNativeFeature extends ContentFeature {
6064
try {
6165
initialSetup = await messages.initialSetup();
6266
} catch (e) {
63-
console.error(e);
67+
console.warn('Failed to get initial setup', e);
6468
return;
6569
}
6670

injected/src/features/duckplayer/overlays.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export async function initOverlays(settings, environment, messages) {
2727
try {
2828
initialSetup = await messages.initialSetup();
2929
} catch (e) {
30-
console.error(e);
30+
console.warn(e);
3131
return;
3232
}
3333

3434
if (!initialSetup) {
35-
console.error('cannot continue without user settings');
35+
console.warn('cannot continue without user settings');
3636
return;
3737
}
3838

0 commit comments

Comments
 (0)