Skip to content

Commit

Permalink
Update js/YouTubeView.js
Browse files Browse the repository at this point in the history
Co-authored-by: eleanor-heath <[email protected]>
  • Loading branch information
oliverfoster and eleanor-heath authored Oct 13, 2021
1 parent a68fc2a commit c48853d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/YouTubeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class YouTubeView extends ComponentView {
const widgetWidth = this.$('.component__widget').width();
$iframe.width(widgetWidth);
// default aspect ratio to 16:9 if not specified
const aspectRatio = parseFloat(this.model.get('_media')._aspectRatio) || 1.778;
const aspectRatio = (parseFloat(this.model.get('_media')._aspectRatio) || 1.778);
if (isNaN(aspectRatio)) return;
$iframe.height(widgetWidth / aspectRatio);
}
Expand Down

0 comments on commit c48853d

Please sign in to comment.