Skip to content

Updating to 1.0.0-dev.18 Causes Lenis to Fail Silently #24

Description

@simonbedard12

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions