fixing dl problem with regexp

This commit is contained in:
Fedor Katurov 2019-10-08 14:19:32 +07:00
parent f664eb53e7
commit 1f774a8299
2 changed files with 2 additions and 2 deletions

View file

@ -415,7 +415,7 @@ function* cropAShotSaga(params) {
yield call(getCropData, params);
const canvas = document.getElementById('renderer') as HTMLCanvasElement;
downloadCanvas(canvas, (title || address).replace('.', ''));
downloadCanvas(canvas, (title || address).replace(/\./ig, ' '));
return yield put(hideRenderer());
}

View file

@ -47,6 +47,6 @@ export const getGPXString = ({ route, title, stickers }: IGetGPXString): string
export const downloadGPXTrack = ({ track, title }: { track: string, title?: string }): void => (
saveAs(
new Blob([track], { type: 'application/gpx+xml;charset=utf-8' }),
`${(title || 'track').replace('.', '')}.gpx`
`${(title || 'track').replace(/\./ig, ' ')}.gpx`
)
);