diff --git a/client/router.js b/client/router.js index e084833..73145d8 100644 --- a/client/router.js +++ b/client/router.js @@ -452,15 +452,19 @@ Router.prototype._initTriggersAPI = function() { this.triggers = { enter: function(triggers, filter) { triggers = Triggers.applyFilters(triggers, filter); - _.extend(self._triggersEnter, triggers); + if(triggers.length) { + self._triggersEnter = self._triggersEnter.concat(triggers); + } }, exit: function(triggers, filter) { triggers = Triggers.applyFilters(triggers, filter); - _.extend(self._triggersExit, triggers); + if(triggers.length) { + self._triggersExit = self._triggersExit.concat(triggers); + } } }; }; Router.prototype._page = page; -Router.prototype._qs = qs; \ No newline at end of file +Router.prototype._qs = qs;