Skip to content

Commit

Permalink
Fix an amp-instagram race condition (#8192)
Browse files Browse the repository at this point in the history
  • Loading branch information
aghassemi committed Mar 27, 2017
1 parent c9bf78f commit 459ab07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/amp-instagram/0.1/amp-instagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class AmpInstagram extends AMP.BaseElement {
if (data.type == 'MEASURE' && data.details) {
const height = data.details.height;
this.getVsync().measure(() => {
if (this.iframe_./*OK*/offsetHeight !== height) {
if (this.iframe_ && this.iframe_./*OK*/offsetHeight !== height) {
// Height returned by Instagram includes header, so
// subtract 48px top padding
this.attemptChangeHeight(height - (PADDING_TOP + PADDING_BOTTOM))
Expand Down

0 comments on commit 459ab07

Please sign in to comment.