Fix - undefined is not necessary to initialize

This commit is contained in:
Shiva Poudel 2015-06-04 18:08:07 +05:45
parent f9b822ae21
commit 2bb8ce3097
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,8 @@ jQuery( function( $ ) {
var nexttermid = ui.item.next().find( '.check-column input' ).val(); var nexttermid = ui.item.next().find( '.check-column input' ).val();
// Can only sort in same tree // Can only sort in same tree
var prevtermparent = undefined; var prevtermparent, nexttermparent;
if ( prevtermid !== undefined ) { if ( prevtermid !== undefined ) {
prevtermparent = ui.item.prev().find('.parent').html(); prevtermparent = ui.item.prev().find('.parent').html();
if ( prevtermparent !== termparent) { if ( prevtermparent !== termparent) {
@ -39,7 +40,6 @@ jQuery( function( $ ) {
} }
} }
var nexttermparent = undefined;
if ( nexttermid !== undefined ) { if ( nexttermid !== undefined ) {
nexttermparent = ui.item.next().find( '.parent' ).html(); nexttermparent = ui.item.next().find( '.parent' ).html();
if ( nexttermparent !== termparent) { if ( nexttermparent !== termparent) {