From cfabdff96cd8cb45ef6a2d5e6ae38a40391e70c2 Mon Sep 17 00:00:00 2001 From: mfo Date: Tue, 26 Nov 2024 11:34:11 +0100 Subject: [PATCH] feat(table.border): at least one px --- app/javascript/controllers/fix_table_border_controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/controllers/fix_table_border_controller.ts b/app/javascript/controllers/fix_table_border_controller.ts index d6b77e907..a8bc79341 100644 --- a/app/javascript/controllers/fix_table_border_controller.ts +++ b/app/javascript/controllers/fix_table_border_controller.ts @@ -2,8 +2,8 @@ import { ApplicationController } from './application_controller'; export class FixTableBorderController extends ApplicationController { connect() { - const pixelSize = Math.round((1 / window.devicePixelRatio) * 100) / 100; - + let pixelSize = Math.round((1 / window.devicePixelRatio) * 100) / 100; + pixelSize = pixelSize < 1 ? 1 : pixelSize; // Safari does not support devicePixelRatio if (navigator.userAgent.indexOf('Safari') > -1) { return;