 
       # Setting is ready: trigger load content
       # ------------------------------------
-      scope.deferred.resolve(setting) if scope.deferred
+      scope.deferred.resolve(setting)
   }
 )

module = angular.module('impac.components.widgets-settings.dates-picker',[])

module.directive('settingDatesPicker', ($templateCache, $filter, ImpacWidgetsSvc, $timeout, $compile) ->

    restrict: 'A',
    scope: {
      parentWidget: '=?'
      deferred: '='
      fromDate: '=from'
      toDate: '=to'
      keepToday: '='
