Skip to content

Commit

Permalink
Allow null value for mode parameter in getParams function
Browse files Browse the repository at this point in the history
Explicitly updated the type of the `mode` parameter to `string | null` in the `getParams` function to support cases where `mode` might be `null`. This improves flexibility and handling of optional parameters.
  • Loading branch information
recky-a authored Jul 20, 2024
1 parent c06b861 commit 64ba1e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/example-umami/lib/get-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DrupalJsonApiParams } from "drupal-jsonapi-params"
// A helper function to build params for a resource type.
export function getParams(
name: string,
mode: string = null
mode: string | null = null
): DrupalJsonApiParams {
const params = new DrupalJsonApiParams()

Expand Down

0 comments on commit 64ba1e6

Please sign in to comment.