aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 148f462a..2ca4cb80 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1042,12 +1042,8 @@ class Plyr {
// If it's a soft destroy, make minimal changes
if (soft) {
if (Object.keys(this.elements).length) {
- // Remove buttons
- if (this.elements.buttons && this.elements.buttons.play) {
- Array.from(this.elements.buttons.play).forEach(button => utils.removeElement(button));
- }
-
- // Remove others
+ // Remove elements
+ utils.removeElement(this.elements.buttons.play);
utils.removeElement(this.elements.captions);
utils.removeElement(this.elements.controls);
utils.removeElement(this.elements.wrapper);