Skip to content

Commit

Permalink
error.stack has no message in FF
Browse files Browse the repository at this point in the history
  • Loading branch information
tophf committed Sep 1, 2022
1 parent bf3dd03 commit 0306214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edit/editor-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 0306214

Please sign in to comment.