Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/api/streak/live/ws/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function GET(request: Request) {
let interval = 30; // default 30s
if (intervalParam) {
const parsed = parseInt(intervalParam, 10);
if (!isNaN(parsed)) {
if (!Number.isNaN(parsed)) {
interval = Math.max(30, Math.min(parsed, 300));
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/generator/components/GitHubImportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,5 @@ export function GitHubImportModal({ isOpen, onClose, onApply }: GitHubImportModa
</div>
);
}

.catch(err => console.error("Promise.all failed:", err));
2 changes: 1 addition & 1 deletion components/AdvancedColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default function AdvancedColorPicker({
};

const handleRgbChange = (channel: 'r' | 'g' | 'b', raw: string) => {
const num = Math.max(0, Math.min(255, parseInt(raw) || 0));
const num = Math.max(0, Math.min(255, parseInt(raw, 10) || 0));
const current = hexToRgb(value) || { r: 0, g: 0, b: 0 };
const newRgb = { ...current, [channel]: num };
const newHex = rgbToHex(newRgb.r, newRgb.g, newRgb.b);
Expand Down
2 changes: 1 addition & 1 deletion utils/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function rgbToHsl(r: number, g: number, b: number): { h: number; s: numbe
break;
}
}
return { h: Math.round(h * 360), s: Math.round(s * 100), l: Math.round(l * 100) };
return { h: Math.round(h * 360 + Number.EPSILON), s: Math.round(s * 100), l: Math.round(l * 100) };
}

export function hexToHsl(hex: string): { h: number; s: number; l: number } {
Expand Down
Loading