db/PadManager: early return, no functional changes
This commit is contained in:
parent
ecb0c41d29
commit
4728736dd8
1 changed files with 9 additions and 10 deletions
|
@ -214,19 +214,18 @@ exports.sanitizePadId = function(padId, callback) {
|
|||
if(exists)
|
||||
{
|
||||
callback(padId);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
//get the next transformation *that's different*
|
||||
var transformedPadId = padId;
|
||||
while(transformedPadId == padId && transform_index < padIdTransforms.length)
|
||||
{
|
||||
//get the next transformation *that's different*
|
||||
var transformedPadId = padId;
|
||||
while(transformedPadId == padId && transform_index < padIdTransforms.length)
|
||||
{
|
||||
transformedPadId = padId.replace(padIdTransforms[transform_index][0], padIdTransforms[transform_index][1]);
|
||||
transform_index += 1;
|
||||
}
|
||||
//check the next transform
|
||||
exports.sanitizePadId(transformedPadId, callback, transform_index);
|
||||
transformedPadId = padId.replace(padIdTransforms[transform_index][0], padIdTransforms[transform_index][1]);
|
||||
transform_index += 1;
|
||||
}
|
||||
//check the next transform
|
||||
exports.sanitizePadId(transformedPadId, callback, transform_index);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue