Permalink
Browse files

use document.body if it exists

  • Loading branch information...
1 parent d3aef7c commit 39ceb000d7cdb67272bdb4beb554e93e2d764c1c @fabiomcosta fabiomcosta committed Feb 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/Slick.Finder.js
View
@@ -57,7 +57,7 @@ local.setDocument = function(document){
var selected, id = 'slick_uniqueid';
var testNode = document.createElement('div');
- var testRoot = document.getElementsByTagName('body')[0] || root;
+ var testRoot = document.body || document.getElementsByTagName('body')[0] || root;
testRoot.appendChild(testNode);
// on non-HTML documents innerHTML and getElementsById doesnt work properly

0 comments on commit 39ceb00

Please sign in to comment.