2019-05-29 14:39:54 +02:00
|
|
|
const _ = require('lodash');
|
|
|
|
|
const originalConsoleError = console.error;
|
2019-04-25 22:44:41 +02:00
|
|
|
|
|
|
|
|
// JSDom's CSS Parser has limited support for certain features
|
|
|
|
|
// This supresses error warnings caused by it
|
|
|
|
|
console.error = function(msg) {
|
2023-08-09 16:07:33 +02:00
|
|
|
if (_.startsWith(msg, 'Error: Could not parse CSS stylesheet')) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2019-05-29 14:39:54 +02:00
|
|
|
originalConsoleError(msg);
|
|
|
|
|
};
|