We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf98b66 commit 15905cbCopy full SHA for 15905cb
src/contexts/player/index.ts
@@ -427,10 +427,16 @@ export class PlayerContext extends Context<PlayerContext> {
427
return Number(id) || 0;
428
}
429
430
- const { attribs: { href } } = $(`a[href^="/profile/${this.username}"].nav-link`)
+ const link = $(`a[href^="/profile/${this.username}"].nav-link`)
431
.get(0);
432
433
- return Number(href.split('.').pop()) || 0;
+ if (link) {
434
+ const { attribs: { href } } = link;
435
+
436
+ return Number(href.split('.').pop()) || 0;
437
+ }
438
439
+ return 0;
440
441
442
/**
0 commit comments