Skip to content

Commit

Permalink
Wait for window.opts.arh_javascript_aspect_ratio_show before discon…
Browse files Browse the repository at this point in the history
…necting observer #61 (#63)
  • Loading branch information
thomasasfk committed Jun 4, 2023
1 parent 0bccd48 commit 99fcf9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/aspectRatioController.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class AspectRatioController {
const heightContainer = gradioApp().querySelector(`#${page}_height`);

// wait for width and height containers to exist.
if (widthContainer && heightContainer) {
if (widthContainer && heightContainer && window.opts && window.opts.arh_javascript_aspect_ratio_show !== undefined) {
observer.disconnect();
if (!window.opts.arh_javascript_aspect_ratio_show) {
return;
Expand Down

0 comments on commit 99fcf9b

Please sign in to comment.