Browse Source

tidy up code for #2940

Hakim El Hattab 4 years ago
parent
commit
236d3e3722
3 changed files with 3 additions and 7 deletions
  1. 0 0
      dist/reveal.esm.js
  2. 0 0
      dist/reveal.js
  3. 3 7
      js/controllers/slidecontent.js

File diff suppressed because it is too large
+ 0 - 0
dist/reveal.esm.js


File diff suppressed because it is too large
+ 0 - 0
dist/reveal.js


+ 3 - 7
js/controllers/slidecontent.js

@@ -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() ) {

Some files were not shown because too many files changed in this diff