Skip to content

Commit

Permalink
refactor: add default parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Indyandie committed Jul 19, 2024
1 parent ef01da5 commit d10f355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/layouts/CardLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const { title, test, data } = Astro.props
document.body.scrollTo(x, 0)
}

function adjustScroll(key) {
function adjustScroll(key = null) {
let width = window.innerWidth
let scroll = document.body.scrollLeft
let multiplier = Math.round(scroll / width)
Expand Down

0 comments on commit d10f355

Please sign in to comment.