Fixed null argument errors for timers and layout animations

This commit is contained in:
Nick Lockwood committed 2015-08-01 06:40:27 -08:00
1 parent 3e79838a31
commit 95d1fd142e
7 files changed
+16 -15

No files matched your search

@@ -47,7 +47,7 @@ var JSTimers = {
return func.apply(undefined, args);
};
JSTimersExecution.types[freeIndex] = JSTimersExecution.Type.setTimeout;
RCTTiming.createTimer(newID, duration, Date.now(), /** recurring */ false);
RCTTiming.createTimer(newID, duration || 0, Date.now(), /** recurring */ false);
return newID;
},
@@ -63,7 +63,7 @@ var JSTimers = {
return func.apply(undefined, args);
};
JSTimersExecution.types[freeIndex] = JSTimersExecution.Type.setInterval;
RCTTiming.createTimer(newID, duration, Date.now(), /** recurring */ true);
RCTTiming.createTimer(newID, duration || 0, Date.now(), /** recurring */ true);
return newID;
},