mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-04 02:32:58 +03:00
Fixed maxVisits being set to 0 when trying to reset it
This commit is contained in:
parent
44aca4aeda
commit
f3154e770e
2 changed files with 25 additions and 2 deletions
src/short-urls/helpers
|
@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|||
import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
|
||||
import { ExternalLink } from 'react-external-link';
|
||||
import moment from 'moment';
|
||||
import { pipe } from 'ramda';
|
||||
import { isEmpty, pipe } from 'ramda';
|
||||
import { shortUrlType } from '../reducers/shortUrlsList';
|
||||
import { shortUrlEditMetaType } from '../reducers/shortUrlMeta';
|
||||
import DateInput from '../../utils/DateInput';
|
||||
|
@ -37,7 +37,7 @@ const EditMetaModal = (
|
|||
|
||||
const close = pipe(resetShortUrlMeta, toggle);
|
||||
const doEdit = () => editShortUrlMeta(shortUrl.shortCode, {
|
||||
maxVisits: maxVisits && parseInt(maxVisits),
|
||||
maxVisits: maxVisits && !isEmpty(maxVisits) ? parseInt(maxVisits) : null,
|
||||
validSince: validSince && formatIsoDate(validSince),
|
||||
validUntil: validUntil && formatIsoDate(validUntil),
|
||||
}).then(close);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue