Skip to content

Commit

Permalink
Merge pull request #1433 from Tyriar/fix_lint
Browse files Browse the repository at this point in the history
Run tslint on all of src/ (for good this time)
  • Loading branch information
Tyriar authored May 14, 2018
2 parents 7a9f291 + 9bcecd4 commit 435cf91
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"scripts": {
"start": "node demo/app",
"start-zmodem": "node demo/zmodem/app",
"lint": "tslint src/*.ts src/**/*.ts src/addons/**/*.ts",
"lint": "tslint 'src/**/*.ts'",
"test": "npm-run-all mocha lint",
"mocha": "gulp test",
"build:docs": "jsdoc -c jsdoc.json",
Expand Down
13 changes: 6 additions & 7 deletions src/renderer/atlas/CharAtlas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ export function acquireCharAtlas(terminal: ITerminal, colors: IColorSet, scaledC
if (ownedByIndex >= 0) {
if (configEquals(entry.config, newConfig)) {
return entry.bitmap;
}
// The configs differ, release the terminal from the entry
if (entry.ownedBy.length === 1) {
charAtlasCache.splice(i, 1);
} else {
// The configs differ, release the terminal from the entry
if (entry.ownedBy.length === 1) {
charAtlasCache.splice(i, 1);
} else {
entry.ownedBy.splice(ownedByIndex, 1);
}
break;
entry.ownedBy.splice(ownedByIndex, 1);
}
break;
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/shared/atlas/CharAtlasGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ export function generateCharAtlas(context: Window, canvasFactory: (width: number
if (canvas instanceof HTMLCanvasElement) {
// Just return the HTMLCanvas if it's a HTMLCanvasElement
return canvas;
} else {
// Transfer to an ImageBitmap is this is an OffscreenCanvas
return new Promise(r => r(canvas.transferToImageBitmap()));
}
// Transfer to an ImageBitmap is this is an OffscreenCanvas
return new Promise(r => r(canvas.transferToImageBitmap()));
}

const charAtlasImageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
Expand Down

0 comments on commit 435cf91

Please sign in to comment.