Skip to content

Commit

Permalink
lint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk committed Apr 15, 2015
1 parent 6fe4bc5 commit 338f843
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/RemoteFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class RemoteFile {

// Record the full file length if it's available.
var size = this._getLengthFromContentRange(xhr);
if (size != null) {
if (size !== null && size !== undefined) {
if (this.fileLength != -1 && this.fileLength != size) {
console.warn(`Size of remote file ${this.url} changed from ` +
`${this.fileLength} to ${size}`);
Expand Down
6 changes: 3 additions & 3 deletions src/bam.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function readAlignmentsToEnd(buffer: ArrayBuffer) {
return {
alignments,
lastByteRead: lastStartOffset - 1
}
};
}

// Given an offset in a concatenated buffer, determine the offset it
Expand All @@ -94,13 +94,13 @@ function splitOffset(buffers: ArrayBuffer[], chunk: Chunk, lastByteRead: number)
// Fetch alignments from the remote source at the locations specified by Chunks.
// This can potentially result in many network requests.
// The returned promise is fulfilled once it can be proved that no more
// alignments need to be fetch.
// alignments need to be fetched.
function fetchAlignments(remoteFile: RemoteFile,
idxRange: ContigInterval<number>,
contained: boolean,
chunks: Chunk[],
alignments: Object[]): Q.Promise<Object[]> {
if (chunks.length == 0) {
if (chunks.length === 0) {
return Q.when(alignments);
}

Expand Down
3 changes: 1 addition & 2 deletions test/bam-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ var expect = chai.expect;

var Bam = require('../src/bam'),
ContigInterval = require('../src/ContigInterval'),
RemoteFile = require('../src/RemoteFile'),
VirtualOffset = require('../src/VirtualOffset');
RemoteFile = require('../src/RemoteFile');

describe('BAM', function() {
it('should parse BAM files', function(done) {
Expand Down

0 comments on commit 338f843

Please sign in to comment.