]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
check if cb is a function 9139/head 9210/head
authormaks feltrin <pine3ree@gmail.com>
Mon, 29 Aug 2016 23:36:33 +0000 (01:36 +0200)
committerGitHub <noreply@github.com>
Mon, 29 Aug 2016 23:36:33 +0000 (01:36 +0200)
js/foundation.util.timerAndImageLoader.js

index b5facd02f3d3095b07916d7ec894fced478c6990..2e9f9e6738161d7601702979385f87a593fd2709 100644 (file)
@@ -29,7 +29,7 @@ function Timer(elem, options, cb) {
       if(options.infinite){
         _this.restart();//rerun the timer.
       }
-      cb();
+      if (cb && typeof cb === 'function') { cb(); }
     }, remain);
     elem.trigger(`timerstart.zf.${nameSpace}`);
   }