SpacePen's constructor doesn't default first arg to an empty object

If you want your view's initialize, class or content argument to default to an empty object, do it yourself!
This commit is contained in:
Corey Johnson
2012-05-16 10:35:00 -07:00
parent 55e3f94a35
commit a866d53e96

View File

@@ -58,7 +58,7 @@ class View extends jQuery
fragment
constructor: (args...) ->
args[0] ?= {}
# args[0] ?= {}
[html, postProcessingSteps] = @constructor.buildHtml -> @content(args...)
jQuery.fn.init.call(this, html)
@constructor = jQuery # sadly, jQuery assumes this.constructor == jQuery in pushStack