mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Fix html builder bug: functions are considered objects, causing attributes to get clobbered.
This commit is contained in:
@@ -41,7 +41,7 @@ class Builder
|
||||
|
||||
|
||||
elementIsVoid: (name) ->
|
||||
_.contains(this.constructor.elements.void, name)
|
||||
name in @constructor.elements.void
|
||||
|
||||
extractOptions: (args) ->
|
||||
options = {}
|
||||
@@ -49,7 +49,7 @@ class Builder
|
||||
options.content = arg if _.isFunction(arg)
|
||||
options.text = arg if _.isString(arg)
|
||||
options.text = arg.toString() if _.isNumber(arg)
|
||||
options.attributes = arg if _.isObject(arg)
|
||||
options.attributes = arg if _.isObject(arg) and not _.isFunction(arg)
|
||||
options
|
||||
|
||||
text: (string) ->
|
||||
|
||||
Reference in New Issue
Block a user