mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
2
vendor/space-pen.coffee
vendored
2
vendor/space-pen.coffee
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user