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

Unified Diff: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js

Issue 2053743002: [Media Router WebUI] Prevent error when route becomes null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove undefined from closure type Created 4 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/media_router/elements/media_router_container/media_router_container.js
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
index 4e9e32662cd14341e2e86f98e3e98632bfd80593..8958dbeaaabb089b51ed765be54e89b316277eb5 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -1178,11 +1178,11 @@ Polymer({
/**
* @param {?media_router.Route} route Route to get the sink for.
- * @return {?media_router.Sink|undefined} Sink associated with |route| or
+ * @return {?media_router.Sink} Sink associated with |route| or
* undefined if we don't have data for the sink.
*/
getSinkForRoute_: function(route) {
- return this.sinkMap_[route.sinkId];
+ return route ? this.sinkMap_[route.sinkId] : null;
},
/**
« 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