Skip to content

Commit

Permalink
fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Voytenko committed Sep 16, 2016
1 parent f45a6eb commit 0d089ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export function escapeCssSelectorIdent(win, ident) {
*/
export function getFrameElement(win) {
try {
return win.frameElement;
return /** @type {?HTMLIFrameElement} */ (win.frameElement);
} catch (e) {
// Ignore the error.
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/service/ampdoc-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class AmpDocService {

// Traverse the boundary of a friendly iframe.
const win = (n.ownerDocument || n).defaultView;
if (win && win != this.win && getTopWindow(win) == this.win_) {
if (win && win != this.win && getTopWindow(win) == this.win) {
const frameElement = getFrameElement(win);
if (frameElement) {
n = frameElement;
Expand Down

0 comments on commit 0d089ec

Please sign in to comment.