Clean up code for updated getConditionalValue()

This commit is contained in:
Bryan Ashby 2018-06-13 20:58:02 -06:00
parent c08e4dbe04
commit 7748765ce0
1 changed files with 1 additions and 5 deletions

View File

@ -221,11 +221,7 @@ function handleAction(client, formData, conf, cb) {
}
function handleNext(client, nextSpec, conf, cb) {
assert(_.isString(nextSpec) || _.isArray(nextSpec));
if(_.isArray(nextSpec)) {
nextSpec = client.acs.getConditionalValue(nextSpec, 'next');
}
nextSpec = client.acs.getConditionalValue(nextSpec, 'next'); // handle any conditionals
const nextAsset = asset.getAssetWithShorthand(nextSpec, 'menu');
// :TODO: getAssetWithShorthand() can return undefined - handle it!