Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Capture group name assignment fails with TypeError: Cannot read property 'slice' of null #17

Closed
@myAlterX

Description

@myAlterX

Hi,
Not sure if you are still maintaining this project, but is seems like a great way to simplify the use of RegExp. Congrats.
I found a problem where I'm running several strings through a match and if nothing matches, result is null which results in an error in the following line:

    return Array.prototype.reduce.call(result.slice(1), (result, current, index) => {

However I understand this is a workaround implementation for named captures which is now a part of the ECMAScript spec, so not sure if placing a check is the right move or simply to support named matches natively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp