mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-03 23:07:26 +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
23
CHANGELOG.md
23
CHANGELOG.md
|
@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
#### Added
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Changed
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Deprecated
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Removed
|
||||||
|
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
* [#193](https://github.com/shlinkio/shlink-web-client/issues/193) Fixed `maxVisits` being set to 0 when trying to reset it from having a value to `null`.
|
||||||
|
|
||||||
|
|
||||||
## 2.3.0 - 2020-01-19
|
## 2.3.0 - 2020-01-19
|
||||||
|
|
||||||
#### Added
|
#### Added
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
|
import { faInfoCircle as infoIcon } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { ExternalLink } from 'react-external-link';
|
import { ExternalLink } from 'react-external-link';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { pipe } from 'ramda';
|
import { isEmpty, pipe } from 'ramda';
|
||||||
import { shortUrlType } from '../reducers/shortUrlsList';
|
import { shortUrlType } from '../reducers/shortUrlsList';
|
||||||
import { shortUrlEditMetaType } from '../reducers/shortUrlMeta';
|
import { shortUrlEditMetaType } from '../reducers/shortUrlMeta';
|
||||||
import DateInput from '../../utils/DateInput';
|
import DateInput from '../../utils/DateInput';
|
||||||
|
@ -37,7 +37,7 @@ const EditMetaModal = (
|
||||||
|
|
||||||
const close = pipe(resetShortUrlMeta, toggle);
|
const close = pipe(resetShortUrlMeta, toggle);
|
||||||
const doEdit = () => editShortUrlMeta(shortUrl.shortCode, {
|
const doEdit = () => editShortUrlMeta(shortUrl.shortCode, {
|
||||||
maxVisits: maxVisits && parseInt(maxVisits),
|
maxVisits: maxVisits && !isEmpty(maxVisits) ? parseInt(maxVisits) : null,
|
||||||
validSince: validSince && formatIsoDate(validSince),
|
validSince: validSince && formatIsoDate(validSince),
|
||||||
validUntil: validUntil && formatIsoDate(validUntil),
|
validUntil: validUntil && formatIsoDate(validUntil),
|
||||||
}).then(close);
|
}).then(close);
|
||||||
|
|
Loading…
Reference in a new issue