234028e6 by Michael Richards

Don't assume that the model always exists on the binding when applying formatters to a value.

1 parent ceab081c
...@@ -42,7 +42,7 @@ class Rivets.Binding ...@@ -42,7 +42,7 @@ class Rivets.Binding
42 args = formatter.split /\s+/ 42 args = formatter.split /\s+/
43 id = args.shift() 43 id = args.shift()
44 44
45 formatter = if @model[id] instanceof Function 45 formatter = if @model?[id] instanceof Function
46 @model[id] 46 @model[id]
47 else 47 else
48 @view.formatters[id] 48 @view.formatters[id]
......