Skip to content

Commit

Permalink
fix console.table polyfill when entries are missing
Browse files Browse the repository at this point in the history
Summary: Looks like react-addons-perf is sometimes missing entries. This prevents it from crashing.

Reviewed By: davidaurelio

Differential Revision: D3669007

fbshipit-source-id: 18a1102b5ad8dcfd9b80d39e1172ba85ad0e9dd2
  • Loading branch information
sahrens authored and Facebook Github Bot 8 committed Aug 4, 2016
1 parent 0371d81 commit bc9c3fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-packager/src/Resolver/polyfills/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ function setupConsole(global) {
columns.forEach(function(k, i) {
columnWidths[i] = k.length;
for (var j = 0; j < rows.length; j++) {
var cellStr = rows[j][k].toString();
var cellStr = (rows[j][k] || '?').toString();
stringRows[j] = stringRows[j] || [];
stringRows[j][i] = cellStr;
columnWidths[i] = Math.max(columnWidths[i], cellStr.length);
Expand Down

0 comments on commit bc9c3fc

Please sign in to comment.