Describe the Bug
After upgrading to 1.0.0-dev.18, Tempus.add() now passes a single object to the callback instead of a numeric time value. This API change is fine, but it introduces a breaking change for existing Lenis integrations.
Before:
Tempus.add((time) => {
lenis.raf(time)
})
After:
Tempus.add(({ time }) => {
lenis.raf(time)
})
The issue is that if you forget to update the callback signature, lenis.raf(time) receives the entire object instead of a number. Lenis doesn't throw an error—it simply stops working, making the issue difficult to diagnose.
Because the failure is completely silent, it can take a while to realize that the callback signature changed.
Expected Behavior
Ideally, one of the following should happen:
- Display a clear console warning or error when lenis.raf() receives an invalid argument.
- Maintain some form of backward compatibility for the previous callback signature.
- At the very least, document this as a breaking change in the release notes or migration guide.
Actual Behavior
The application fails silently. No error or warning is displayed, making it difficult to identify the source of the problem.
Describe the Bug
After upgrading to 1.0.0-dev.18, Tempus.add() now passes a single object to the callback instead of a numeric time value. This API change is fine, but it introduces a breaking change for existing Lenis integrations.
Before:
After:
The issue is that if you forget to update the callback signature, lenis.raf(time) receives the entire object instead of a number. Lenis doesn't throw an error—it simply stops working, making the issue difficult to diagnose.
Because the failure is completely silent, it can take a while to realize that the callback signature changed.
Expected Behavior
Ideally, one of the following should happen:
Actual Behavior
The application fails silently. No error or warning is displayed, making it difficult to identify the source of the problem.