Skip to content

withFeatureCheck() not fully chainable after withClientHints()? #812

@maoosi

Description

@maoosi

Library version

@ua-parser-js/pro-business - 2.0.6

Describe the bug

While implementing both withClientHints() and withFeatureCheck(), I noticed three things:

1/ API forces a two-step call

const parser = await UAParser(ua).withClientHints();
await parser.withFeatureCheck();

2/ Chaining works on Chrome but throws on Safari/Firefox (and maybe others?) with TypeError: ...withFeatureCheck is not a function.

3/ Docs only cover using withClientHints() or withFeatureCheck() separately but not together.

Expected behavior

Ideally, withFeatureCheck() should be chainable with withClientHints() and return graceful fallback values instead of throwing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions