Skip to content

Commit

Permalink
refactor: import maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
mic-web committed Sep 9, 2024
1 parent 26d3ab0 commit 80ff6d9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/GlobalFormsProvider/GlobalFormsProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { callSequentially } from '@mll-lab/js-utils';
import { Maybe, callSequentially } from '@mll-lab/js-utils';
import { sortBy } from 'lodash';
import React, {
PropsWithChildren,
Expand All @@ -19,13 +19,11 @@ export type GlobalFormsProviderProps = PropsWithChildren<unknown>;
function findNextOrder(
callbacks: Maybe<Record<string, CallbackWithOrder>>,
): number {
if (! callbacks) {
if (!callbacks) {
return 1;
}

const orders = Object.values(callbacks).map(
(callback) => callback.order,
);
const orders = Object.values(callbacks).map((callback) => callback.order);
if (orders.length === 0) {
return 1;
}
Expand Down

0 comments on commit 80ff6d9

Please sign in to comment.