mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
chore: eslint no-var, vars-on-top
This commit is contained in:
committed by
Julian Lam
parent
b56d9e12b5
commit
dab3b23575
@@ -30,9 +30,9 @@ module.exports = function (Categories) {
|
||||
const result = await plugins.hooks.fire('filter:category.update', { cid: cid, category: modifiedFields });
|
||||
|
||||
const category = result.category;
|
||||
var fields = Object.keys(category);
|
||||
const fields = Object.keys(category);
|
||||
// move parent to front, so its updated first
|
||||
var parentCidIndex = fields.indexOf('parentCid');
|
||||
const parentCidIndex = fields.indexOf('parentCid');
|
||||
if (parentCidIndex !== -1 && fields.length > 1) {
|
||||
fields.splice(0, 0, fields.splice(parentCidIndex, 1)[0]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user