Skip to content

Commit 5a4b305

Browse files
authored
Merge pull request #3393 from Tyriar/tyriar/less_than
Use less than instead of non-integer check
2 parents 6f83809 + 0ceeb08 commit 5a4b305

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/xterm-addon-webgl/src/renderLayer/CursorRenderLayer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ export class CursorRenderLayer extends BaseRenderLayer {
193193

194194
private _clearCursor(): void {
195195
if (this._state) {
196-
// Avoid potential rounding errors when device pixel ratio is an odd number
197-
if (window.devicePixelRatio % 1 !== 0) {
196+
// Avoid potential rounding errors when device pixel ratio is less than 1
197+
if (window.devicePixelRatio < 1) {
198198
this._clearAll();
199199
} else {
200200
this._clearCells(this._state.x, this._state.y, this._state.width, 1);

0 commit comments

Comments
 (0)