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..641c2958e09ac5b1bc212cd366b1f28ba3cb147b 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 isPrintPreviewDistiller !== 'undefined' |
+ && isPrintPreviewDistiller) { |
setTimeout(function() { |
window.location = window.location + "#loaded"; |
}, 0); |