Permalink
Browse files

Fixed a DOM node or jQuery object passed as the 1th item in a Haml ar…

…ray being treated as an attributes object.
  • Loading branch information...
1 parent 536688c commit 2cf6fdddf9c0c06d3bc4ee28220dc1e4b9e0dbb4 Sidney San Martín committed Jun 10, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.haml-1.3.js
View
@@ -108,7 +108,7 @@
newnode = $(document.createElement(tag));
// Parse the attributes if there are any
- if (input.length > 0 && isTypeOf(input[0], 'Object')) {
+ if (input.length > 0 && isTypeOf(input[0], 'Object') && !input[0].nodeType && !input[0].jquery) {
attributes = input.shift();
css = extractor(attributes, 'css');
actions = extractor(attributes, '$');

0 comments on commit 2cf6fdd

Please sign in to comment.