Optimize efficiency ordering tags
This commit is contained in:
+2
-1
@@ -43,7 +43,8 @@
|
||||
"suspicious": {
|
||||
"noEmptyBlockStatements": "error",
|
||||
"noControlCharactersInRegex": "off",
|
||||
"useErrorMessage": "error"
|
||||
"useErrorMessage": "error",
|
||||
"noAssignInExpressions": "off"
|
||||
},
|
||||
"nursery": {}
|
||||
}
|
||||
|
||||
+1
-4
@@ -84,10 +84,7 @@ export function orderTags(nativeTags: ITag[]): INativeTagDict {
|
||||
const tags: INativeTagDict = {};
|
||||
|
||||
for (const { id, value } of nativeTags) {
|
||||
if (!tags[id]) {
|
||||
tags[id] = [];
|
||||
}
|
||||
tags[id].push(value);
|
||||
(tags[id] ||= []).push(value);
|
||||
}
|
||||
|
||||
return tags;
|
||||
|
||||
Reference in New Issue
Block a user