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) {
|
Mux.prototype.routeMessage = function (body) {
|
||||||
if (Trie.matchValue(this.routingTable, body) === null) {
|
if (Trie.matchValue(this.routingTable, body, null) === null) {
|
||||||
return Trie.matchValue(this.routingTable, Patch.observe(body)) || Immutable.Set();
|
return Trie.matchValue(this.routingTable, Patch.observe(body), null) || Immutable.Set();
|
||||||
} else {
|
} else {
|
||||||
// Some other stream has declared body
|
// Some other stream has declared body
|
||||||
return Immutable.Set();
|
return Immutable.Set();
|
||||||
|
|
|
@ -405,9 +405,7 @@ function subtract(o1, o2, subtractSuccessesOpt) {
|
||||||
|
|
||||||
// Returns failureResult on failed match, otherwise the appropriate success
|
// Returns failureResult on failed match, otherwise the appropriate success
|
||||||
// value contained in the trie r.
|
// value contained in the trie r.
|
||||||
function matchValue(r, v, failureResultOpt) {
|
function matchValue(r, v, failureResult) {
|
||||||
var failureResult = failureResultOpt || null;
|
|
||||||
|
|
||||||
var vs = Immutable.List.of(v);
|
var vs = Immutable.List.of(v);
|
||||||
|
|
||||||
while (!is_emptyTrie(r)) {
|
while (!is_emptyTrie(r)) {
|
||||||
|
|
Loading…
Reference in New Issue