Skip to content

Optional chaining introduced in v13.15.22 causes runtime error on older Node versions #2630

@NoCtrlZ1110

Description

@NoCtrlZ1110

Describe the bug
Our application suddenly broke today because validator automatically updated to v13.15.22 (published ~7 hours ago).
The new build on npm seems to contain optional chaining (?.) inside the distributed code (e.g., in isMACAddress.js), which was never present in previous versions (e.g., v13.15.20).

This change causes syntax errors on environments running older Node.js versions that don’t support optional chaining.

Image

Examples
Image

Reproductions
N/A

Additional context
Validator.js version: 13.15.22
Node.js version: 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions