We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 737ba14 commit aaa5e93Copy full SHA for aaa5e93
app.js
@@ -56,7 +56,7 @@ const backChain = function(goal, assertions) {
56
trueAssertion = backChain(premise, assertions);
57
58
// Add the assertion to the assertion list.
59
- trueAssertion && assertions.push(trueAssertion);
+ trueAssertion && !assertions.some(assertion => assertion.attribute === trueAssertion.attribute && assertion.value === trueAssertion.value) && assertions.push(trueAssertion);
60
61
// Is the trueAssertion equal to the premise?
62
isPremiseAssertionTrue = JSON.stringify(premise) === JSON.stringify(trueAssertion);
0 commit comments