Skip to content

Commit

Permalink
fix(nvue): functionCallRE
Browse files Browse the repository at this point in the history
  • Loading branch information
yurj26 committed May 29, 2023
1 parent 310ab06 commit af28b6a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2401,7 +2401,7 @@ var acorn = require('acorn'); // $flow-disable-line
var walk = require('acorn/dist/walk'); // $flow-disable-line
var escodegen = require('escodegen');

var functionCallRE = /(\w+)\((.*)\)/;
var functionCallRE = /^\s*([A-Za-z_$0-9\['\."\]]+)*\s*\(\s*(([A-Za-z_$0-9\['\."\]]+)?(\s*,\s*([A-Za-z_$0-9\['\."\]]+))*)\s*\)$/;

function nodeToBinding (node) {
switch (node.type) {
Expand Down Expand Up @@ -2488,10 +2488,9 @@ function genWeexHandler (handler, options) {
var code = handler.value;
var isMethodPath = simplePathRE.test(code);
var isFunctionExpression = fnExpRE.test(code);
var isFunctionCall = functionCallRE.test(code);

// TODO: binding this to recyclable event handlers
if (options.recyclable) {
var isFunctionCall = functionCallRE.test(code);
if (isMethodPath) {
return ("function($event){this." + code + "()}")
}
Expand Down

0 comments on commit af28b6a

Please sign in to comment.