Skip to content

Commit acf7303

Browse files
committed
fix: send default amount of points in case it failed to find the number after a click
1 parent dd9dcf4 commit acf7303

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/contentScripts/worker.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ function tryToGetReceivedPoints() {
4949
if (attempts === maxAttempts) {
5050
clearInterval(pointsInterval);
5151
console.error('Failed to find the amount of gathered points');
52+
// sending the default amount. For subbed people that would be incorrect, but that's better than loosing track of all of them
53+
browser.runtime.sendMessage({
54+
type: 'add_points',
55+
bonus: 50,
56+
channelId
57+
})
5258
return;
5359
}
5460

0 commit comments

Comments
 (0)