Browse Source

fix template error on blocks list when the list isn't full

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
bac144bc11
  1. 17
      views/includes/blocks-list.pug

17
views/includes/blocks-list.pug

@ -9,11 +9,12 @@ table(class="table table-striped")
th Size (bytes)
tbody
each block, blockIndex in blocks
tr
th #{blockIndex + blockOffset + 1}
td
a(href=("/block-height/" + block.height)) #{block.height}
td #{moment.utc(new Date(parseInt(block.time) * 1000)).format("Y-MM-DD HH:mm:ss")}
td #{moment.utc(new Date(parseInt(block.time) * 1000)).fromNow(true)}
td #{block.tx.length.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
td #{block.size.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
if (block)
tr
th #{blockIndex + blockOffset + 1}
td
a(href=("/block-height/" + block.height)) #{block.height}
td #{moment.utc(new Date(parseInt(block.time) * 1000)).format("Y-MM-DD HH:mm:ss")}
td #{moment.utc(new Date(parseInt(block.time) * 1000)).fromNow(true)}
td #{block.tx.length.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
td #{block.size.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
Loading…
Cancel
Save