summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2016-01-15 01:25:25 +0100
committerVictor Häggqvist <[email protected]>2016-01-15 01:25:25 +0100
commitbd6d2f8cca1405b2eaee147bc4106974dbbd7882 (patch)
tree1760ea9c0f0658194fbb7c55d3f0dbbfdf748a39
parent5239e282e9d19c2e1388664c9f18a76479f4578a (diff)
fix image removal
-rw-r--r--src/LightBox.js3
1 files changed, 2 insertions, 1 deletions
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;
}