ajacksified/Mediator.js — pull request #28 by kanuck (2014-07-25 02:08:35+00:00)
Title: Fix bug with removing subscribers w/ predicates

I've added a test case that currently fails with:

TypeError: Cannot read property 'options' of undefined
at Object.Channel.publish (lib/mediator.js:211:24)

The issue is that the "subsAfter/subsBefore" logic to handle a subscriber removing itself is only happening when the subscriber doesn't have a predicate.

(seems there might also be another issue if a subscriber removes >1 subscriber, but I haven't tried to build a test case for that, one thing at a time..)