fix(13-03): resolve ESLint no-unused-expressions errors

Replace optional chaining expressions with explicit if checks to satisfy ESLint configuration.
This commit is contained in:
Nuwan 2026-02-05 11:38:28 +05:30
parent f2c07faede
commit edf74f7248
1 changed files with 8 additions and 4 deletions

View File

@ -998,7 +998,9 @@ const JKSessionScreen = () => {
// Attach button handlers
const handleAttachClick = useCallback(() => {
attachFileInputRef.current?.click();
if (attachFileInputRef.current) {
attachFileInputRef.current.click();
}
}, []);
const handleFileSelect = useCallback((e) => {
@ -1017,9 +1019,11 @@ const JKSessionScreen = () => {
}
// Show warnings if any (e.g., backend may not fully support this type)
validation.warnings?.forEach(warning => {
console.warn('Attachment warning:', warning);
});
if (validation.warnings) {
validation.warnings.forEach(warning => {
console.warn('Attachment warning:', warning);
});
}
// Open chat window if not already open
dispatch(openModal('chat'));