From a2b89edb4fa56f84bde284107ee9ceabb022e13f Mon Sep 17 00:00:00 2001 From: Patryk Grandt Date: Wed, 8 Aug 2012 16:15:10 +0300 Subject: [PATCH] Sometimes you may want to call destroy close event --- Source/LightFace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/LightFace.js b/Source/LightFace.js index 03d860e..46b0883 100644 --- a/Source/LightFace.js +++ b/Source/LightFace.js @@ -71,7 +71,7 @@ var LightFace = new Class({ tween: { duration: this.options.fadeDuration, onComplete: function() { - if(this.box.getStyle("opacity") == 0) { + if(this.box && this.box.getStyle("opacity") == 0) { this.box.setStyles({ top: -9000, left: -9000 }); } }.bind(this)