Fix scheduledAt not working when popping composer out

pull/1314/head
Lim Chee Aun 2025-10-16 10:10:10 +08:00
rodzic 5a448e3bf4
commit 7b3438a43f
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -4,8 +4,9 @@ export const MIN_SCHEDULED_AT = 6 * 60 * 1000; // 6 mins
const MAX_SCHEDULED_AT = 90 * 24 * 60 * 60 * 1000; // 90 days
export default function ScheduledAtField({ scheduledAt, setScheduledAt }) {
if (!scheduledAt || !(scheduledAt instanceof Date)) {
console.warn('scheduledAt is not a Date:', scheduledAt);
if (!scheduledAt || !scheduledAt?.getTime) {
// Not using "instanceof Date" check due to "cross-realm" issues
console.warn('scheduledAt is invalid', scheduledAt);
return;
}
const [minStr, setMinStr] = useState();