Skip to content

Commit 22dfd00

Browse files
meixgallen-zh
authored andcommitted
fix(build): fix '||' is marked as filter (#59)
1 parent ee22aa6 commit 22dfd00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mars-build/src/compiler/template/mark-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function isComplexExp(exp) {
8989
function getFilters(node) {
9090
let props = node.attrsList
9191
? node.attrsList.filter(({name, value}) =>
92-
name.indexOf(':') >= 0 && (value.indexOf('|') > 0 || isComplexExp(value))
92+
name.indexOf(':') >= 0 && (/[^|]+\|[^|]+/.test(value) || isComplexExp(value))
9393
)
9494
: [];
9595
props = props.map(({name}) => name.replace(/^(v-bind)?:/, ''));

0 commit comments

Comments
 (0)