8dabc199 by Paul Jones

Don't fail if Rivets.config.formatters isn't set

1 parent 5b6f9ed2
...@@ -26,7 +26,10 @@ class Rivets.Binding ...@@ -26,7 +26,10 @@ class Rivets.Binding
26 for formatter in @formatters 26 for formatter in @formatters
27 args = formatter.split /\s+/ 27 args = formatter.split /\s+/
28 id = args.shift() 28 id = args.shift()
29 value = (Rivets.config.formatters[id] || @model[id]) value, args... 29 value = if Rivets.config.formatters && Rivets.config.formatters[id]
30 Rivets.config.formatters[id] value, args...
31 else
32 @model[id] value, args...
30 33
31 value 34 value
32 35
......