Skip to content

Commit

Permalink
jQuery.print: no Array.prototype.indexOf in IE6, use $.inArray instead
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed May 12, 2008
1 parent f5be179 commit fc0967f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/jquery.print.js
Expand Up @@ -32,7 +32,8 @@

var result = []
for (var k in obj) {
if (opts.seen.indexOf(obj[k]) == -1) {
if (Object.prototype.hasOwnProperty.apply(obj, [k]) &&
$.inArray(obj[k], opts.seen) == -1) {
opts.seen.push(obj[k])
result.push(k + ": " + $.print(obj[k], opts))
}
Expand Down Expand Up @@ -110,8 +111,7 @@
else if (obj instanceof Array)
return print_array(obj, opts)

// no HTMLElement in IE6
else if (obj.nodeType)
else if (obj.nodeType) // no HTMLElement in IE6
return print_element(obj)

else if (obj instanceof jQuery)
Expand Down

0 comments on commit fc0967f

Please sign in to comment.