mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
chore(deps): bump typescript to 4.8.4 (#24272)
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { isNil } from 'lodash';
|
||||
|
||||
export default function extent<T = number | string | Date | undefined | null>(
|
||||
values: T[],
|
||||
) {
|
||||
@@ -24,16 +27,16 @@ export default function extent<T = number | string | Date | undefined | null>(
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const value of values) {
|
||||
if (value !== null) {
|
||||
if (min === undefined) {
|
||||
if (isNil(min)) {
|
||||
if (value !== undefined) {
|
||||
min = value;
|
||||
max = value;
|
||||
}
|
||||
} else {
|
||||
} else if (value !== undefined) {
|
||||
if (min > value) {
|
||||
min = value;
|
||||
}
|
||||
if (max !== undefined) {
|
||||
if (!isNil(max)) {
|
||||
if (max < value) {
|
||||
max = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user