chore: eslint no-var, vars-on-top

This commit is contained in:
Peter Jaszkowiak
2021-02-04 00:06:15 -07:00
committed by Julian Lam
parent b56d9e12b5
commit dab3b23575
255 changed files with 1988 additions and 1995 deletions

View File

@@ -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]);
}