Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/scroll-timeline-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ export class ScrollTimeline {
const maxScrollPos = calculateMaxScrollOffset(container, axis);

return maxScrollPos > 0 ? CSS.percent(100 * scrollPos / maxScrollPos)
: CSS.percent(100);
: unresolved;
}

get __polyfill() {
Expand Down Expand Up @@ -878,6 +878,10 @@ export class ViewTimeline extends ScrollTimeline {
const offsets = range(this, 'cover');
if (!offsets)
return unresolved;

if (offsets.end === offsets.start)
return unresolved;

const progress =
(scrollPos - offsets.start) / (offsets.end - offsets.start);

Expand Down