Skip to content

Commit

Permalink
Small fixes: Removed unnecessary Promise.resolve()s (#4240)
Browse files Browse the repository at this point in the history
  • Loading branch information
Terran Lane authored and jridgewell committed Jul 28, 2016
1 parent c57f512 commit 589f817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/amp-a4a/0.1/amp-a4a.js
Expand Up @@ -554,7 +554,7 @@ export class AmpA4A extends AMP.BaseElement {
// will run efficiently.
this.renderViaIframe_();
this.rendered_ = true;
return Promise.resolve(true);
return true;
} else {
try {
// Do extraction processing on CSS and body before creating the
Expand Down Expand Up @@ -603,12 +603,12 @@ export class AmpA4A extends AMP.BaseElement {
this.rendered_ = true;
this.onAmpCreativeShadowDomRender();
});
return Promise.resolve(true);
return true;
} catch (e) {
// If we fail on any of the steps of Shadow DOM construction, just
// render in iframe.
// TODO: report!
return Promise.resolve(false);
return false;
}
}
});
Expand Down

0 comments on commit 589f817

Please sign in to comment.