More premature optimization

pull/37/head
Varun Patil 2022-09-12 03:52:17 -07:00
parent 4795045f08
commit cc630f9ea9
3 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -471,11 +471,12 @@ export default {
// Add placeholders // Add placeholders
const leftNum = (day.count - i * this.numCols); const leftNum = (day.count - i * this.numCols);
const rowCount = leftNum > this.numCols ? this.numCols : leftNum; const rowCount = leftNum > this.numCols ? this.numCols : leftNum;
row.photos = new Array(rowCount);
for (let j = 0; j < rowCount; j++) { for (let j = 0; j < rowCount; j++) {
row.photos.push({ row.photos[j] = {
flag: constants.FLAG_PLACEHOLDER, flag: constants.FLAG_PLACEHOLDER,
fileid: `${day.dayid}-${i}-${j}`, fileid: `${day.dayid}-${i}-${j}`,
}); };
} }
} }
} }