fix(web): unicorn/prefer-math-trunc (#8720)

This commit is contained in:
Yat Ho
2026-03-23 22:13:04 +08:00
committed by GitHub
parent dba3e8f9d3
commit e87cc06d68

View File

@@ -15,7 +15,7 @@ import {
export class PrefsDialog extends EventTarget { export class PrefsDialog extends EventTarget {
static _initTimeDropDown(e) { static _initTimeDropDown(e) {
for (let index = 0; index < 24 * 4; ++index) { for (let index = 0; index < 24 * 4; ++index) {
const hour = (index / 4) | 0; const hour = Math.trunc(index / 4);
const mins = (index % 4) * 15; const mins = (index % 4) * 15;
const value = index * 15; const value = index * 15;
const content = `${hour}:${mins || '00'}`; const content = `${hour}:${mins || '00'}`;