From 6b9b737e40004cbe10acff77f7b08c4576e88568 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 7 Mar 2017 18:47:00 +0700 Subject: [PATCH] Make sure no return value is resolved --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a0d5b22..dc14c4e 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,7 @@ const whenDomReady = (cb, doc) => new Promise(resolve => { doc = doc || window.document; // Handle DOM load - const done = () => resolve(cb && setTimeout(cb)); + const done = () => resolve(void (cb && setTimeout(cb))); // Resolve now if DOM has already loaded // Otherwise wait for DOMContentLoaded