From 746b0e857c479aff17d4e004bdd0375c44978146 Mon Sep 17 00:00:00 2001 From: Eric Berens Date: Thu, 18 Jan 2018 15:50:16 -0500 Subject: [PATCH] Handle caught 'SyntaxError' errors * Updated processor to return the original input on SyntaxError errors so it can fall through to other processors --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 9cf003d..95f1dfc 100644 --- a/src/index.js +++ b/src/index.js @@ -37,10 +37,14 @@ module.exports = options => ({ ) return extractedCSS } catch (e) { + const name = e.name // incorrect interpolations will throw CssSyntaxError and they'll be handled by stylelint if (e.name === 'CssSyntaxError') { throw e } + if (name === 'SyntaxError') { + return input + } return '' } },