emberjs/ember.js — pull request #884 by joliss (2012-05-25 16:39:07+00:00)
Title: Assert

* Guard against currentState being null when sending events to StateManager

This happened when I tried to use a Router without a root state. It
doesn't make sense to send events to a state manager that doesn't have a
current state, so this makes the error message a little more
descriptive.

* Guard against missing initialState

If for instance, you instantiate a Router without a root state, you'd
just get an error message saying that the currentState is null. This
clarifies to the user what's missing.

Supersedes #882, retargeted against 0-9-stable (I *thought* something was missing), with more elaboration.