Skip to content

Commit

Permalink
Fixed Bricks read only issue (#98)
Browse files Browse the repository at this point in the history
I got an issue Bricks is read-only  because bricks is `const` at line 176 declared so it must be `let`
  • Loading branch information
vijaychouhan-rails authored and brh55 committed Sep 13, 2018
1 parent 593db2b commit 2419911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Masonry.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default class Masonry extends Component {

if (column) {
// Append to existing "row"/"column"
const bricks = [...column, resolvedBrick];
let bricks = [...column, resolvedBrick];
if (sorted) {
// Sort bricks according to the index of their original array position
bricks = bricks.sort((a, b) => (a.index < b.index) ? -1 : 1);
Expand Down

0 comments on commit 2419911

Please sign in to comment.