Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support server side rendering #461

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion js/iframeResizer.contentWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

;(function(window, undefined) {
'use strict';

if(!window) return;

var
autoResize = true,
Expand Down Expand Up @@ -1101,4 +1103,4 @@



})(window || {});
})(typeof window !== 'undefined' && window);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this line now just be this?

})(window)

Copy link
Author

@simoneb simoneb Feb 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it will throw an exception because the global variable window is not defined. I got inspiration from this. But I don't think we need that many checks here

4 changes: 3 additions & 1 deletion js/iframeResizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
;(function(window) {
'use strict';

if(!window) return;

var
count = 0,
logEnabled = false,
Expand Down Expand Up @@ -1013,4 +1015,4 @@
window.iFrameResize = window.iFrameResize || factory();
}

})(window || {});
})(typeof window !== 'undefined' && window);