Permalink
Browse files

Sometimes the body doesn't exist yet when doing length units calculat…

…ion (e.g. inclusion of PIE*.js), so fall back to documentElement
  • Loading branch information...
1 parent 9799198 commit 862c62688ec32ed65db4195b4d4dd4bbe84adc01 Jason Johnston committed with Nov 25, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 sources/Length.js
View
@@ -7,7 +7,7 @@
*/
PIE.Length = (function() {
var lengthCalcEl = doc.createElement( 'length-calc' ),
- parent = doc.body,
+ parent = doc.body || doc.documentElement,
s = lengthCalcEl.style,
conversions = {},
units = [ 'mm', 'cm', 'in', 'pt', 'pc' ],

0 comments on commit 862c626

Please sign in to comment.