From 3869193d33ef347e424be78172bebfe626694c6a Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Wed, 28 Dec 2011 16:29:30 -0600 Subject: [PATCH] Fix html builder bug: functions are considered objects, causing attributes to get clobbered. --- src/stdlib/template/builder.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stdlib/template/builder.coffee b/src/stdlib/template/builder.coffee index 819842bc7..080b3e3e3 100644 --- a/src/stdlib/template/builder.coffee +++ b/src/stdlib/template/builder.coffee @@ -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) ->