Skip to content

Commit

Permalink
change for..of to forEach to fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
sospartan committed Nov 25, 2015
1 parent 4554e02 commit 4358dd6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ var ConsolePanel = React.createClass({
render:function(){
var content = [];
if(this.state.isOpen) {
for (let row of this.state.dataSource) {
this.state.dataSource.forEach((row)=>{
content.push(<Text style={[this._pickStyle(row.level),styles.contentText]}>{row.text}</Text>);
}
});
if (this.state.dataSource.length < 3) {
content.push(<Text
style={[styles.log,styles.contentText]}>{String('\n'.repeat(3 - this.state.dataSource.length))}</Text>);
Expand Down Expand Up @@ -270,12 +270,11 @@ var _setup = function(_global,_keepYellowBox) {
return;
}
this.timeout = setTimeout(()=> {

for (let callback of this.listeners) {
this.listeners.forEach((callback)=>{
callback();
clearTimeout(this.timeout);
this.waiting = false;
}
});
}, 500);
this.waiting = true;
}
Expand Down

0 comments on commit 4358dd6

Please sign in to comment.