From 9c75f27240ef4bc50ac78c9cacbb6e95e6afd33a Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Fri, 15 Jan 2016 19:00:38 -0800 Subject: [PATCH] Make Babylon correctly handle "flow" being present multiple times in plugins. --- src/parser/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/index.js b/src/parser/index.js index a9882ff30a..1a0227fd4e 100644 --- a/src/parser/index.js +++ b/src/parser/index.js @@ -36,7 +36,7 @@ export default class Parser extends Tokenizer { if (plugins.indexOf("flow") >= 0) { // ensure flow plugin loads last - plugins.splice(plugins.indexOf("flow"), 1); + plugins = plugins.filter(plugin => plugin !== "flow"); plugins.push("flow"); }