enyojs/enyo — pull request #537 by unwiredben (2013-11-04 21:16:10+00:00)
Title: ENYO-3519: fix enyo.ModelController init of model property

enyo.ModelController.modelChanged() wasn't handling the case
where prev and model parameters were both undefined which happens
during the notifyObservers() call in enyo.ModelController.create().
Fix by making sure notifyObservers always includes those values
and optimize away that call if it's constructed with null model.

Also, fix separate potential bug in UiComponent where similar
code existed. It wasn't an issue with the current controllerChanged
method, but if it was changed in the future, it could have the same
issue.

Added test case to ControllerTest showing original bug, verified
that it failed before and passes now.

Enyo-DCO-1.1-Signed-Off-By: Ben Combee (ben.combee@lge.com)