Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4348)

Unified Diff: chrome/browser/resources/print_preview/data/destination_store.js

Issue 2927703004: Print Preview: Check capabilities before sending info ready (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/data/destination_store.js
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js
index 19499638cd577b7a46a0f850f0cfd48baaa9da5c..764301ab39ec8c084fd9c7ff20e2e9348428c570 100644
--- a/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -735,11 +735,15 @@ cr.define('print_preview', function() {
name,
false /*isRecent*/,
print_preview.DestinationConnectionStatus.ONLINE);
- this.selectedDestination_.capabilities = capabilities;
- cr.dispatchSimpleEvent(
- this,
- DestinationStore.EventType.CACHED_SELECTED_DESTINATION_INFO_READY);
+ if (capabilities) {
+ this.selectedDestination_.capabilities = capabilities;
+
+ cr.dispatchSimpleEvent(
+ this,
+ DestinationStore.EventType
+ .CACHED_SELECTED_DESTINATION_INFO_READY);
+ }
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698