Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
wizulus committed Dec 10, 2023
1 parent ce93ed5 commit 07d3f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface MusicPreviewerProps {
onMouseDown?: (evt: React.MouseEvent<HTMLElement>) => void,
onMouseUp?: (evt: React.MouseEvent<HTMLElement>) => void,
toolbarAdditions?: React.ReactNode,
children: React.ReactNode,
children?: React.ReactNode,
gridTileLength?: number,
gridTilesPerBeat?: number,
}
Expand Down Expand Up @@ -221,6 +221,7 @@ MusicPreviewer.defaultProps = {
toolbarAdditions: null,
gridTileLength: 8,
gridTilesPerBeat: 4,
children: null,
};

export default MusicPreviewer;
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ function TrackChooser(props: {onInputChange: (arg0: boolean) => void}) {
* Gets the last beat of a set of note groups.
*/
export function getEndBeat(groups: PianoRollNoteGroup[]) {
return groups.reduce((curMaxBeat, group) => Math.max(curMaxBeat, group.notes.reduce((curNoteMaxBeat, note) => Math.max(curNoteMaxBeat, note.beat), 0)), 0);
return groups.reduce((curMaxBeat, group) => Math.max(
curMaxBeat,
group.notes.reduce((curNoteMaxBeat, note) => Math.max(curNoteMaxBeat, note.beat), 0)
), 0);
}

export default TrackChooser;

0 comments on commit 07d3f82

Please sign in to comment.