use the last index of underscore
This commit is contained in:
parent
47c6fabc05
commit
3b9841b9c4
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue