Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Ensure width is a number

Chocobozzz003f358c45dc
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
index f1606e452c..819eff5aff 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
@@ -117,7 +117,7 @@ export class VideoThumbnailComponent implements OnChanges {
? window.innerWidth
: cssVariable.replace('px', '').trim()
- if (!widthStr) {
+ if (!widthStr || isNaN(+widthStr)) {
logger.error('Cannot find thumbnail width in CSS variables. Fallback to 280px')
width = 280
} else {