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:
parent
f2c07faede
commit
edf74f7248
|
|
@ -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'));
|
||||
|
|
|
|||
Loading…
Reference in New Issue