This commit is contained in:
Josh Harvey 2016-10-11 16:15:30 +01:00
parent 259b527214
commit 0a2d2f658e
6 changed files with 90 additions and 61 deletions

View file

@ -57,7 +57,8 @@ function fallbackValue (crypto, machine, instances) {
const pickValue = arr => R.find(instance => matchesValue(arr[0], arr[1], instance), instances)
console.log('DEBUG11: %j', permutations(crypto, machine))
console.log('DEBUG14: %j', R.map(pickValue, permutations(crypto, machine)))
return R.find(notNil, R.map(pickValue, permutations(crypto, machine)))
const fallbackRec = R.find(notNil, R.map(pickValue, permutations(crypto, machine)))
return fallbackRec && fallbackRec.fieldValue.value
}
function generalScoped (crypto, machine, config) {