From f109ba9f1f507862ba15a8e3a15ca60d36ccb99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bouc=CC=8Cek?= Date: Tue, 22 Dec 2015 12:28:18 +0100 Subject: [PATCH] Fix NotFoundError exception when is toolbar inserted to specified node by `includeTo` option. Fixes #8. --- source/cookies.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cookies.js b/source/cookies.js index 03d1349..b797651 100644 --- a/source/cookies.js +++ b/source/cookies.js @@ -126,7 +126,7 @@ } function consent( div ) { - d.body.removeChild( div ); + div.parentNode.removeChild( div ); invokeEvent(hideEvent, consentReason); addCookie(); }