Make matchValue's failureResult non-optional
This commit is contained in:
parent
5ec89bd987
commit
1f33039e28
|
@ -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();
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue