Skip to content

Commit

Permalink
voxeliterator now checks if the passed map has elements (#3405)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBuessemeyer authored Nov 12, 2018
1 parent f136969 commit 165b183
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/assets/javascripts/oxalis/model/volumetracing/volumelayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ export class VoxelIterator {
this.minCoord2d = minCoord2d;
this.get3DCoordinate = get3DCoordinate;
this.boundingBox = boundingBox;
const firstCoordinate = this.get3DCoordinate(this.minCoord2d);
if (this.map[0][0] && this.isCoordinateInBounds(firstCoordinate)) {
this.next = firstCoordinate;
if (!this.map || !this.map[0]) {
this.hasNext = false;
} else {
this.getNext();
const firstCoordinate = this.get3DCoordinate(this.minCoord2d);
if (this.map[0][0] && this.isCoordinateInBounds(firstCoordinate)) {
this.next = firstCoordinate;
} else {
this.getNext();
}
}
}

Expand Down

0 comments on commit 165b183

Please sign in to comment.