Skip to content

Commit

Permalink
Fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
richardscarrott committed Aug 23, 2024
1 parent 3562656 commit 9477ef3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/use-snap-carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ const getScrollMarginUsedValue = (el: HTMLElement, pos: 'left' | 'top') => {
const scrollMargin = style.getPropertyValue(`scroll-margin-${pos}`) || '0px';
// https://developer.mozilla.org/en-US/docs/Web/CSS/length
// https://www.w3.org/TR/css3-values/#length-value
// alert(scrollMargin);
const invalidMsg = `Unsupported scroll margin value, expected <length> value, received ${scrollMargin}`;
assert(scrollMargin.endsWith('px'), invalidMsg); // Even scroll-margin: 0 should return "0px"
const value = parseInt(scrollMargin);
Expand Down

0 comments on commit 9477ef3

Please sign in to comment.