Skip to content
This repository
Browse code

Merge branch 'master' of https://github.com/ziggythehamster/PIE into …

…ziggythehamster
  • Loading branch information...
commit 127348f0639e469651d77fdbf8f2751447843621 2 parents e8ccbd6 + 4f092d9
Jason Johnston authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. +5 3 sources/htc_init.js
8 sources/htc_init.js
@@ -2,14 +2,16 @@ var p = window['PIE'],
2 2 el = element;
3 3
4 4 function init() {
5   - if( doc.media !== 'print' ) { // IE strangely attaches a second copy of the behavior to elements when printing
  5 + if( p && doc.media !== 'print' ) { // IE strangely attaches a second copy of the behavior to elements when printing
6 6 p['attach']( el );
7 7 }
8 8 }
9 9
10 10 function cleanup() {
11   - p['detach']( el );
12   - p = el = 0;
  11 + if (p) {
  12 + p['detach']( el );
  13 + p = el = 0;
  14 + }
13 15 }
14 16
15 17 if( el.readyState === 'complete' ) {

0 comments on commit 127348f

Please sign in to comment.
Something went wrong with that request. Please try again.