Skip to content

filter with empty arguments cause error in chrome 57- #7544

Closed
@lxjwlt

Description

@lxjwlt

Version

2.5.13

Reproduction link

https://jsfiddle.net/lxjwlt/ajy768fs/

Steps to reproduce

in chrome 57 and 56,

  1. filter with empty arguments:

    <div>{{text | someFilter()}}</div>
  2. when no parentheses:

    <div>{{text | someFilter}}</div>

What is expected?

  1. no error
  2. no error

What is actually happening?

1.in chrome 57 and 56, report error:

[Vue warn]: Error compiling template:

<div>{{text | someFilter()}}</div>

- invalid expression: Unexpected token ) in

    _s(_f("someFilter")(text,))

  Raw expression: {{text | someFilter()}}



(found in <Root>)

2.no error


I have also examined the chrome 58 and 63 which have no errors both, so i guess this bug only occurs in chrome 57-.

mac-chrome57: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/444958/

win-chrome57: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/444958/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions