Skip to content

Amplitude-js 8.21.4 breaks compatibility with safari 12 #576

@heyvard

Description

@heyvard

8.21.4 includes a new version of filter-obj that uses the Optional chaining operator. This is not supported on safari 12 https://caniuse.com/mdn-javascript_operators_optional_chaining

Expected Behavior

The lib is usable for users on safari 12

Current Behavior

Our app crashes on users with ios 12 and safari 12

Possible Solution

Revert dependency upgrades in 8.21.4 ? Add meassaures to ensure compatibility

Steps to Reproduce

  1. Include 8.21.4 as a dependency in a simple next js app
  2. Deploy app
  3. Open app in safari 12 (I recommend browserstack)
  4. The app will not load, since it is not able to parse the javascript

Environment

  • JS SDK Version: 8.21.4
  • Installation Method: npm dependency i next js app
  • Browser and Version: Safari 12

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