From 1f774a8299bf155779329f96911f6f933016a865 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Tue, 8 Oct 2019 14:19:32 +0700 Subject: [PATCH] fixing dl problem with regexp --- src/redux/user/sagas.ts | 2 +- src/utils/gpx.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redux/user/sagas.ts b/src/redux/user/sagas.ts index 43f8b7f..c5717db 100644 --- a/src/redux/user/sagas.ts +++ b/src/redux/user/sagas.ts @@ -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()); } diff --git a/src/utils/gpx.ts b/src/utils/gpx.ts index 1a70c09..28d4df2 100644 --- a/src/utils/gpx.ts +++ b/src/utils/gpx.ts @@ -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` ) );