Index: ui/webui/resources/js/cr/ui/grid.js |
diff --git a/ui/webui/resources/js/cr/ui/grid.js b/ui/webui/resources/js/cr/ui/grid.js |
index 1203cf4f2f7fa078befc3ccdc8755bb7e2ea29dd..ecfc56eb580220be567b0cfef1573cedadc1e911 100644 |
--- a/ui/webui/resources/js/cr/ui/grid.js |
+++ b/ui/webui/resources/js/cr/ui/grid.js |
@@ -89,6 +89,9 @@ |
getColumnCount_: function() { |
// Size comes here with margin already collapsed. |
var size = this.getDefaultItemSize_(); |
+ |
+ if (!size) |
+ return 0; |
// We should uncollapse margin, since margin isn't collapsed for |
// inline-block elements according to css spec which are thumbnail items. |