Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix(date): Add check for existence of controller before calling $render

  • Loading branch information...
commit e67bbce5ad3b3e924391530d3142ef7e8c83f1d9 1 parent 67d10ae
Pete Bacon Darwin authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  modules/directives/date/date.js
6  modules/directives/date/date.js
@@ -61,8 +61,10 @@ angular.module('ui.directives')
61 61
         element.datepicker('destroy');
62 62
         // Create the new datepicker widget
63 63
         element.datepicker(opts);
64  
-        // Force a render to override whatever is in the input text box
65  
-        controller.$render();
  64
+        if ( controller ) {
  65
+          // Force a render to override whatever is in the input text box
  66
+          controller.$render();
  67
+        }
66 68
       };
67 69
       // Watch for changes to the directives options
68 70
       scope.$watch(getOptions, initDateWidget, true);

0 notes on commit e67bbce

Please sign in to comment.
Something went wrong with that request. Please try again.