1
0
Fork 0

GeneralStepUi: Do not try to sort one group

An error was being thrown because there are no siblings to reference when
there is only a single group.  Obviously sorting is not even needed in such
a situation.

src/ui/step/GeneralStepUi.js (_sortGroups): Abort if <= 1 groups.
master
Mike Gerwitz 2017-10-23 14:56:51 -04:00
parent 248130400b
commit c41d0aa924
1 changed files with 2 additions and 1 deletions

View File

@ -1102,7 +1102,8 @@ module.exports = Class( 'GeneralStepUi' )
var len = ids.length,
groups = [];
if ( len === 0 )
// if one group (or none), nothing to sort
if ( len <= 1 )
{
return;
}