From 030621462cde7fcc773eb3f627e64fb57a564422 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 1 Sep 2022 10:15:47 +0300 Subject: [PATCH] error.stack has no message in FF --- edit/editor-worker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit/editor-worker.js b/edit/editor-worker.js index aee5b22b..4cd78e08 100644 --- a/edit/editor-worker.js +++ b/edit/editor-worker.js @@ -79,8 +79,8 @@ return collectStylelintResults(res, opts); } catch (e) { const fatal = pass === -1 || - !pass && !/^CssSyntaxError:.+?Unnecessary curly bracket/.test(e.stack) || - pass && !/^CssSyntaxError:.+?Unknown word[\s\S]*?\.decl\s/.test(e.stack); + !pass && !/^CssSyntaxError:.+?Unnecessary curly bracket/.test(e) || + pass && !/^CssSyntaxError:.+?Unknown word[\s\S]*?\.decl\s/.test(`${e}${e.stack}`); if (fatal) { return [{ from: {line: e.line - 1, ch: e.column - 1},