From ecf80bdb7d19798e84cc816f0a444db6518065dc Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 5 Nov 2018 13:57:05 +0000 Subject: [PATCH] Properly treat MemberExpressions in patterns --- packages/syntax/src/plugin.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/syntax/src/plugin.js b/packages/syntax/src/plugin.js index 82640e7..108875c 100644 --- a/packages/syntax/src/plugin.js +++ b/packages/syntax/src/plugin.js @@ -172,6 +172,8 @@ function compilePattern(state, patternPath) { if (!isLiteral(pattern)) { console.error('Unsupported pattern node type', pattern); } + // FALL THROUGH + case 'MemberExpression': pushConstant(pattern); return [t.nullLiteral(), pattern]; }