apply no-throw-literal

This commit is contained in:
pypy
2020-01-11 20:27:57 +09:00
parent 15eb9a45ac
commit 98f5448d52
2 changed files with 3 additions and 6 deletions

View File

@@ -50,7 +50,6 @@ module.exports = {
'no-plusplus': 0,
'no-tabs': 0,
'no-ternary': 0,
'no-throw-literal': 0,
'no-undefined': 0,
'no-underscore-dangle': 0,
'no-var': 0,

View File

@@ -423,16 +423,14 @@ if (window.CefSharp) {
if (extra !== undefined) {
text.push(extra);
}
text = text.map((s) => escapeTag(s)).join('<br>');
if (text.length) {
new Noty({
type: 'error',
text: text.map((s) => escapeTag(s)).join('<br>')
text
}).show();
}
throw {
'status_code': code,
error
};
throw new Error(text);
};
API.bulk = function (options) {