From bd6d2f8cca1405b2eaee147bc4106974dbbd7882 Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Fri, 15 Jan 2016 01:25:25 +0100 Subject: fix image removal --- src/LightBox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/LightBox.js') diff --git a/src/LightBox.js b/src/LightBox.js index 8bb2c48..f338652 100644 --- a/src/LightBox.js +++ b/src/LightBox.js @@ -262,7 +262,8 @@ export class LightBox { } removeImage() { - document.body.removeChild(this.image); + let image = document.querySelector('#'+this.options.selectorId); + document.body.removeChild(image); this.image = null; } -- cgit v1.2.3