Skip to content

Commit

Permalink
Run tslint on all of source (for good this time)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed May 4, 2018
1 parent e48b15e commit 9bcecd4
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 @@ -78,7 +78,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 @@ -91,10 +91,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 9bcecd4

Please sign in to comment.