diff --git a/tasks/dist.js b/tasks/dist.js
index <HASH>..<HASH> 100644
--- a/tasks/dist.js
+++ b/tasks/dist.js
@@ -67,7 +67,7 @@ var buildPolyfill = function () {
     var detect = fs.readFileSync(fillPath + poly + '/detect.js', 'utf8'),
         pfill = fs.readFileSync(fillPath + poly + '/polyfill.js', 'utf8');
 
-    fill += 'if (!' + detect + '){' + pfill + '}';
+    fill += 'if (!(' + detect + ')){' + pfill + '}';
   });
 
   fill += '}());'
Improve polyfill injection to make detection of CustomEvent working - fixes Snugug/eq.js/issues/#<I>