use the last index of underscore

This commit is contained in:
Abhinav 2022-02-16 10:13:18 +05:30
parent 47c6fabc05
commit 3b9841b9c4

View file

@ -226,7 +226,7 @@ function areFilesLivePhotoAssets(
}
function removeUnderscoreSuffix(filename: string) {
const indexOfUnderscore = filename.indexOf('_');
const indexOfUnderscore = filename.lastIndexOf('_');
if (indexOfUnderscore !== -1) {
return filename.slice(0, indexOfUnderscore);
} else {