Skip to content

Commit 03a7c6b

Browse files
committed
fixup! ✨(frontend) added accessible html export and moved download option
1 parent 01c41c2 commit 03a7c6b

File tree

1 file changed

+7
-1
lines changed
  • src/frontend/apps/impress/src/features/docs/doc-export/components

1 file changed

+7
-1
lines changed

src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,14 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => {
198198
// Ensure the filename has an extension consistent with the blob MIME type.
199199
const mimeType = fetched.type;
200200
if (mimeType && !baseName.includes('.')) {
201-
const subtype = mimeType.split('/')[1] || '';
201+
const slashIndex = mimeType.indexOf('/');
202+
const rawSubtype =
203+
slashIndex !== -1 && slashIndex < mimeType.length - 1
204+
? mimeType.slice(slashIndex + 1)
205+
: '';
206+
202207
let extension = '';
208+
const subtype = rawSubtype.toLowerCase();
203209

204210
if (subtype.includes('svg')) {
205211
extension = 'svg';

0 commit comments

Comments
 (0)