ESlint eqeqeq

and require-jsdoc, no-negated-condition
This commit is contained in:
Peter Jaszkowiak
2017-02-18 14:36:16 -07:00
parent 144fa8698c
commit fdf4f873bf
5 changed files with 9 additions and 9 deletions

View File

@@ -125,10 +125,10 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seri
}
function itemDragDidEnd(e) {
var isCategoryUpdate = (newCategoryId != -1);
var isCategoryUpdate = (newCategoryId !== -1);
// Update needed?
if ((e.newIndex != undefined && e.oldIndex != e.newIndex) || isCategoryUpdate) {
if ((e.newIndex != null && e.oldIndex !== e.newIndex) || isCategoryUpdate) {
var parentCategory = isCategoryUpdate ? sortables[newCategoryId] : sortables[e.from.dataset.cid];
var modified = {};
var i = 0;