Fix get extencion file

This commit is contained in:
Ezequiel-Vega 2022-03-22 15:47:10 -03:00
parent 5295c3572a
commit a4febe347b

View File

@ -79,7 +79,7 @@ const ImportDialog = ({ onClose }: CreateProps): React.ReactElement => {
} }
} }
const extensionFile = file.name.split('.')[1] const extensionFile = file.name.split('.').pop();
const extensionAccept = ['wxml', 'mm']; const extensionAccept = ['wxml', 'mm'];
if ( extensionAccept.find(ext => ext === extensionFile) ) { if ( extensionAccept.find(ext => ext === extensionFile) ) {