Skip to content

Commit

Permalink
Fixed some errors introduced while refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
diogofcunha committed Jan 21, 2016
1 parent 5da97f5 commit e8b3697
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/DOMMetrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ let MetricsComputatorMixin = {
}
}

metricsToDelete.forEach((metricName) => {
delete s.metrics[metricName];
});
for (name in metricsToDelete) {
if (metricsToDelete.hasOwnProperty(name)) {
delete s.metrics[name];
}
}
}
},

Expand All @@ -65,7 +67,7 @@ let MetricsComputatorMixin = {
let needUpdate = false;

for (let name in s.metrics) {
if (name == null) continue;
if (!s.metrics.hasOwnProperty(name)) continue;

let newMetric = s.metrics[name].computator();
if (newMetric !== s.metrics[name].value) {
Expand Down Expand Up @@ -114,7 +116,7 @@ let MetricsMixin = {

this.DOMMetrics = {};
for (let name in this._DOMMetricsDefs) {
if (name == null) continue;
if (!this._DOMMetricsDefs.hasOwnProperty(name)) continue;

this.DOMMetrics[name] = emptyFunction;
}
Expand Down
4 changes: 2 additions & 2 deletions src/addons/__tests__/GridRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export default class GridRunner {
const rows = TestUtils.scryRenderedDOMComponentsWithClass(this.grid, 'react-grid-Row');
let over = [];
over.push(this.row);
let formIterator = form;
let fromIterator = from;

for (let i = formIterator++; i < to; i++) {
for (let i = fromIterator++; i < to; i++) {
over.push(this.getCells(rows[i])[col]);
}
const toCell = this.getCells(rows[to])[col];
Expand Down

0 comments on commit e8b3697

Please sign in to comment.