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

Unified Diff: chrome/browser/resources/local_ntp/most_visited_thumbnail.js

Issue 1915513002: Fixed invalid parameter used by most visited thumbnail. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added check for thumbnailUrls.length Created 4 years, 8 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/local_ntp/most_visited_thumbnail.js
diff --git a/chrome/browser/resources/local_ntp/most_visited_thumbnail.js b/chrome/browser/resources/local_ntp/most_visited_thumbnail.js
index 3bdfd612e368626717a864b35b6d3be6b4ec1354..33baada73dabe51b3cea73dbf1f67d492a4de9b4 100644
--- a/chrome/browser/resources/local_ntp/most_visited_thumbnail.js
+++ b/chrome/browser/resources/local_ntp/most_visited_thumbnail.js
@@ -78,8 +78,8 @@ window.addEventListener('DOMContentLoaded', function() {
} else if (useIcons && data.largeIconUrl) {
createThumbnail(data.largeIconUrl, 'large-icon');
// TODO(huangs): Log event for large icons.
- } else if (!useIcons && data.thumbnailUrl) {
- createThumbnail(data.thumbnailUrl, 'thumbnail');
+ } else if (!useIcons && data.thumbnailUrls && data.thumbnailUrls.length) {
+ createThumbnail(data.thumbnailUrls[0], 'thumbnail');
logEvent(NTP_LOGGING_EVENT_TYPE.NTP_THUMBNAIL_TILE);
} else if (data.domain) {
showDomainElement();
« 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