Fix a JS error with Perf.clearTimers()