mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-27 03:08:06 +00:00
use 'forEach' instead of 'map' when clearing intervals
This commit is contained in:
@@ -155,7 +155,7 @@ var SetIntervalMixin = {
|
||||
this.intervals.push(setInterval.apply(null, arguments));
|
||||
},
|
||||
componentWillUnmount: function() {
|
||||
this.intervals.map(clearInterval);
|
||||
this.intervals.forEach(clearInterval);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user