diff options
| author | bob <bcz@cs.brown.edu> | 2019-09-05 12:00:18 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-09-05 12:00:18 -0400 |
| commit | 179b2c7c68e3d240f3f39083bdb686ad31761c04 (patch) | |
| tree | 03da1a5f16585cf78d3909a163325a35e06db2e7 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | a936f08e3c18ad34bbe74133eaa768c7bda832dc (diff) | |
fixed some template issues. added attribution for pasted text
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index 97b31bf2a..654ff2279 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -310,6 +310,10 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { sectionMasonry(heading: SchemaHeaderField | undefined, docList: Doc[]) { let cols = Math.max(1, Math.min(docList.length, Math.floor((this.props.PanelWidth() - 2 * this.xMargin) / (this.columnWidth + this.gridGap)))); + if (isNaN(cols)) { + console.log("naN"); + cols = 1; + } return <div key={heading ? heading.heading : "empty"} className="collectionStackingView-masonrySection"> {!heading ? (null) : <div key={`${heading.heading}`} className="collectionStackingView-sectionHeader" style={{ background: heading.color }} |
