mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
workspace: update eslint rule (#1027)
This commit is contained in:
1 parent
05c3b8f2bd
commit
cee3c00ddb
150 files changed
+1069
-1043
No files matched your search
@@ -37,7 +37,7 @@ async function updateSelection() {
|
||||
}
|
||||
}
|
||||
const requestCategoryTags = _.uniq(selections
|
||||
.filter((s) => s.indexOf(',') !== -1)
|
||||
.filter((s) => s.includes(','))
|
||||
.map((s) => s.split(',')[0]));
|
||||
// drop the category if its subcategory is selected
|
||||
const requestTags = _.uniq(_.pullAll(selections, requestCategoryTags));
|
||||
@@ -267,7 +267,7 @@ export default new NamedPage(['problem_create', 'problem_edit'], () => {
|
||||
val = JSON.parse(val);
|
||||
if (!(val instanceof Array)) val = JSON.stringify(val);
|
||||
} catch { }
|
||||
const empty = /^\s*$/g.test(val);
|
||||
const empty = /^\s*$/.test(val);
|
||||
if (empty) delete content[activeTab];
|
||||
else content[activeTab] = val;
|
||||
if (!Object.keys(content).length) $field.text('');
|
||||
|
||||
Reference in new issue
Block a user