Merge pull request #1916 from syedhusain-appspace/develop

Check if key is a string before attempt --plyr checking
This commit is contained in:
Sam Potts 2020-08-30 15:47:25 +10:00 committed by GitHub
commit 3a07669e30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));