mulesoft/api-designer — pull request #268 by AlejoFernandez (2014-12-03 21:25:56+00:00)
Title: [AP-659] Javascript errors loading API Designer

It seems that scope.$root can be null in some cases (when nesting isolated and not isolated scopes, more info here: https://github.com/mgcrea/angular-strap/issues/774#issuecomment-44347448)
I also added some basic tests for the safeApply function (and of course a couple to ensure that the error is fixed).