Skip to content

Incorrect handling of optional named operator when all values are null #10

@Paul-Martin

Description

@Paul-Martin

UriTemplate.parse('/foo{?a,b,c}').expand({});
produces
"/foo?c="
should be
"/foo"

same for operators '&' and ';'

It seems to me that 'if (isFirstVarspec)' block starting at line 668 is unnecessary and removing it will resolve this issue without unwanted side effects.
.

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