fix regular expression syntax error

This commit is contained in:
iovxw
2019-05-23 18:05:28 +08:00
committed by GitHub
parent e559cb3e4c
commit a006cea782

View File

@@ -49,7 +49,7 @@ var SensorsUtil = class extends CommandLineUtil.CommandLineUtil {
// https://github.com/UshakovVasilii/gnome-shell-extension-freon/issues/114#issuecomment-491613545
let lineRemoved = this._output.filter(l => l.trim() !== ',').join('\n');
let errorRemoved = lineRemoved.replace(/ERROR.*Can't read/, "");
errorRemoved = errorRemoved.replace(/ERROR.*I/O error/, "");
errorRemoved = errorRemoved.replace(/ERROR.*I\/O error/, "");
data = JSON.parse(errorRemoved);
} catch (e) {
global.log(e.toString());