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"); }