Skip to content

Commit

Permalink
Gotta check the applied width and height is actually something!
Browse files Browse the repository at this point in the history
Signed-off-by: Jessica González <suki@missallsunday.com>
  • Loading branch information
MissAllSunday committed May 29, 2016
1 parent 5fc01cc commit 85252b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Themes/default/scripts/ohyoutube.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ _oh.prototype.responsive = function()
applyWidth = !applyResize ? $this.defaultWidth : newWidth,
applyHeight = !applyResize ? $this.defaultHeight : newHeight;

// Gotta check the applied width and height is actually something!
if (applyWidth <= 0 && applyHeight <= 0) {
applyWidth = $this.defaultWidth;
applyHeight = $this.defaultHeight;
}

// Gotta resize the master div.
$this.masterDiv.width(applyWidth).height(applyHeight);
$('.oharaEmbed > iframe').each(function(){
Expand Down

0 comments on commit 85252b4

Please sign in to comment.