From 4c1ae8f3ce38aa1b34cd6ab95267a7edf8c41ade Mon Sep 17 00:00:00 2001 From: Syed Husain Date: Thu, 30 Jul 2020 19:43:04 +0800 Subject: [PATCH] Check if key is a string before attempt --plyr checking --- src/js/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/ui.js b/src/js/ui.js index d3d6fd69..fd27e2bc 100644 --- a/src/js/ui.js +++ b/src/js/ui.js @@ -270,7 +270,7 @@ const ui = { // Loop through values (as they are the keys when the object is spread 🤔) Object.values({ ...this.media.style }) // We're only fussed about Plyr specific properties - .filter(key => !is.empty(key) && key.startsWith('--plyr')) + .filter(key => !is.empty(key) && is.string(key) && key.startsWith('--plyr')) .forEach(key => { // Set on the container this.elements.container.style.setProperty(key, this.media.style.getPropertyValue(key));