Index: components/dom_distiller/core/javascript/dom_distiller_viewer.js |
diff --git a/components/dom_distiller/core/javascript/dom_distiller_viewer.js b/components/dom_distiller/core/javascript/dom_distiller_viewer.js |
index 5baef4c077b01e799ed52389fda294a596d17fb9..ef2175edfdef3d5305191833ac0b8cabd0de85cf 100644 |
--- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js |
+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js |
@@ -43,7 +43,8 @@ function showLoadingIndicator(isLastPage) { |
// This function will be one of the last things to occur when a page is |
// loaded. This is temporarily used to signal print preview to generate |
// a PDF. |
- if (isLastPage) { |
+ if (isLastPage && typeof is_print_preview_distiller !== 'undefined' |
Bernhard Bauer
2016/04/25 15:36:38
If you declare this at the global level and initia
mdjones
2016/04/25 16:33:13
Updated var name. Unfortunately I can't pre-define
Bernhard Bauer
2016/04/25 17:30:31
But that's fine, because you'll have declared the
mdjones
2016/04/25 18:24:08
Yes, the whole file is parsed after the JavaScript
Bernhard Bauer
2016/04/28 16:24:04
That does not seem like the right solution. From t
|
+ && is_print_preview_distiller) { |
setTimeout(function() { |
window.location = window.location + "#loaded"; |
}, 0); |