Skip to content

Conversation

callumbwhyte
Copy link

When configuring distance values, such as with peek, all options must be supplied else Glide fails to render.

This works:

{
    peek: {
        before: 50,
        after: 100
    }
}

But setting only a single property breaks:

{
    peek: {
        before: 50
    }
}

This is because peek.after is NaN which then breaks the various calculations.

My changes ensure toInt and toFloat will always return a default value of 0, which ensures calculations continue to work.

@jedrzejchalubek
Copy link
Member

This fallback needs to be done at the Peek component. The utility functions should not have this kind of logic.

@jedrzejchalubek jedrzejchalubek force-pushed the master branch 4 times, most recently from 2ee206d to 914e425 Compare January 19, 2022 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants