Make matchValue's failureResult non-optional

This commit is contained in:
Tony Garnock-Jones 2016-05-17 17:44:14 -04:00
parent 5ec89bd987
commit 1f33039e28
2 changed files with 3 additions and 5 deletions

View File

@ -100,8 +100,8 @@ function computeAffectedPids(routingTable, delta) {
}
Mux.prototype.routeMessage = function (body) {
if (Trie.matchValue(this.routingTable, body) === null) {
return Trie.matchValue(this.routingTable, Patch.observe(body)) || Immutable.Set();
if (Trie.matchValue(this.routingTable, body, null) === null) {
return Trie.matchValue(this.routingTable, Patch.observe(body), null) || Immutable.Set();
} else {
// Some other stream has declared body
return Immutable.Set();

View File

@ -405,9 +405,7 @@ function subtract(o1, o2, subtractSuccessesOpt) {
// Returns failureResult on failed match, otherwise the appropriate success
// value contained in the trie r.
function matchValue(r, v, failureResultOpt) {
var failureResult = failureResultOpt || null;
function matchValue(r, v, failureResult) {
var vs = Immutable.List.of(v);
while (!is_emptyTrie(r)) {