From 8305772cc4e00d6d5763074ed8d55a5a45400e56 Mon Sep 17 00:00:00 2001 From: Jonathan Steinbeck Date: Sat, 12 Oct 2013 07:11:20 +0200 Subject: [PATCH] Fixed a bug in MO5: transform ignored duration 0. --- js/libs/MO5.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/libs/MO5.js b/js/libs/MO5.js index 8dc4f27..c9430ea 100644 --- a/js/libs/MO5.js +++ b/js/libs/MO5.js @@ -215,7 +215,7 @@ var MO5 = (function () throw new Error("MO5.transform expects parameter callback to be a function."); } - var dur = args.duration || 1000, + var dur, now, f, tStart = new Date().getTime(), @@ -227,6 +227,8 @@ var MO5 = (function () doLog = args.log || false, c = 0, // number of times func get's executed onFinish = args.onFinish || function () {}; + + dur = typeof args.duration !== "undefined" ? args.duration : 1000; now = Date.now || function () { return +(new Date()); };