Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit 910fe66

Browse files
Fix typo in range validation
1 parent 9176713 commit 910fe66

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
66
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [6.1.2] 2023-05-30
9+
10+
### Fixed
11+
12+
- fixed a typo in range validation for `GeographicExtentWidget`
13+
814
## [6.1.1] 2023-05-29
915

1016
### Added

__tests__/widgets/GeographicExtentWidget.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@ describe('<GeographicExtentWidget/>', () => {
187187
/**
188188
* South within the permitted range.
189189
*/
190+
expect(
191+
isWithinRange({
192+
name: 'area',
193+
fieldName: 'area_s',
194+
value: '90',
195+
range
196+
})
197+
).toBeTruthy()
198+
190199
expect(
191200
isWithinRange({
192201
name: 'area',

src/widgets/GeographicExtentWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ const isWithinRange = ({
261261
if (`${name}_s` === fieldName) {
262262
const _value = Number(value)
263263

264-
if (_value >= _range[`${name}_n`]) return false
264+
if (_value > _range[`${name}_n`]) return false
265265

266266
if (_value < _range[`${name}_s`]) return false
267267
}

0 commit comments

Comments
 (0)