From f51067b00e8099bb576858e70db6e2fc44ce3d61 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 29 Oct 2012 08:27:20 -0400 Subject: [PATCH] fixed issue with dependency loader failing when there were 0 async scripts (#214) --- js/reveal.js | 6 ++++-- js/reveal.min.js | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/js/reveal.js b/js/reveal.js index 2e3ee391..d92ee76a 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -231,8 +231,10 @@ var Reveal = (function(){ // Called once synchronous scritps finish loading function proceed() { - // Load asynchronous scripts - head.js.apply( null, scriptsAsync ); + if( scriptsAsync.length ) { + // Load asynchronous scripts + head.js.apply( null, scriptsAsync ); + } start(); } diff --git a/js/reveal.min.js b/js/reveal.min.js index 53fb1290..e31d807c 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -16,16 +16,16 @@ f.controlsLeft=document.querySelector(".reveal .controls .left");f.controlsRight f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll"; document.body.style.height="120%";window.addEventListener("load",ad,false);window.addEventListener("orientationchange",ad,false);}}function V(){var am=[],aq=[]; for(var an=0,al=R.dependencies.length;an