Skip to content

Commit

Permalink
tidy up code for #2940
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Apr 28, 2021
1 parent a112712 commit 236d3e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions js/controllers/slidecontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,9 @@ export default class SlideContent {

// Images
if( backgroundImage ) {
let backgroundString = '';
backgroundImage.split(',').forEach(background => {
backgroundString = backgroundString.concat(
'url(' + encodeURI(background.trim()) + '),'
);
});
backgroundContent.style.backgroundImage = backgroundString.substr(0, backgroundString.length - 1);
backgroundContent.style.backgroundImage = backgroundImage.split( ',' ).map( background => {
return `url(${encodeURI(background.trim())})`;
}).join( ',' );
}
// Videos
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
Expand Down

0 comments on commit 236d3e3

Please sign in to comment.