Skip to content

Commit

Permalink
Sometimes the body doesn't exist yet when doing length units calculat…
Browse files Browse the repository at this point in the history
…ion (e.g. inclusion of PIE*.js), so fall back to documentElement
  • Loading branch information
Jason Johnston committed Nov 25, 2011
1 parent 0b100c1 commit 887a062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/Length.js
Expand Up @@ -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' ],
Expand Down

0 comments on commit 887a062

Please sign in to comment.