Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit eec772d

Browse files
committed
Merge pull request #57 from kentcdodds/master
Fixes #55 (probably).
2 parents 321786a + b75d586 commit eec772d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/directives/formly-form.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ angular.module('formly.render')
2727
controller: function($scope, $element, $parse) {
2828
// setup watches for watchExpressions
2929
angular.forEach($scope.fields, function(field, index) {
30-
if (angular.isDefined(field.watch)) {
30+
if (angular.isDefined(field.watch) &&
31+
angular.isDefined(field.watch.expression) &&
32+
angular.isDefined(field.watch.listener)) {
3133
var watchExpression = field.watch.expression;
3234
if (angular.isFunction(watchExpression)) {
3335
// wrap the field's watch expression so we can call it with the field as the first arg as a helper

0 commit comments

Comments
 (0)