| β¦ | β¦ | @@ -150,6 +179,7 @@ export function hostPreviewMimeTypeFromExtension(extension: string): string | nu | |
| 150 | 179 | mediaMimeTypeFromExtension(extension) ?? | |
| 151 | 180 | audioMimeTypeFromExtension(extension) ?? | |
| 152 | 181 | BROWSER_MIME_TYPE_BY_EXTENSION.get(extension.toLowerCase()) ?? | |
| 182 | + | OFFICE_MIME_TYPES[extension.toLowerCase().slice(1) as OfficePreviewKind] ?? | |
π’ Low src/filePreview.ts:182
For .constructor, this lookup returns the inherited Object constructor instead of null, so finalizeAbsoluteMediaFileAsset accepts example.constructor as a supported preview file. The direct index access checks the prototype chain; guard the lookup with an own-property check.
No longer relevant as of 33ec7687c3d91490d55c15a2cb34821a06ec3650