FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow null value for `mode` parameter in getParams function by c-oyen · Pull Request #790 · chapter-three/next-drupal · GitHub

Allow null value for mode parameter in getParams function - #790

Open
c-oyen wants to merge 1 commit into
chapter-three:mainfrom
c-oyen:patch-1
Open

Allow null value for mode parameter in getParams function #790
c-oyen wants to merge 1 commit into
chapter-three:mainfrom
c-oyen:patch-1

Conversation

c-oyen commented Jul 20, 2024

Copy link
Copy Markdown

This pull request is for: (mark with an "x")

  • examples/*
  • modules/next
  • packages/next-drupal
  • starters/basic-starter
  • starters/graphql-starter
  • starters/pages-starter
  • Other

Description

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.

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.

vercel Bot commented Jul 20, 2024

Copy link
Copy Markdown

@Anrecky is attempting to deploy a commit to the Chapter Three Team on Vercel.

A member of the Team first needs to authorize it.

BourezBastien added a commit to BourezBastien/next-drupal that referenced this pull request Aug 24, 2026
…ull typing

getParams() fell through without returning for unknown resource types,
returning undefined instead of a DrupalJsonApiParams instance. Add a
fallback return and type the mode parameter as string | null.

Adopted from upstream PRs chapter-three#790 and chapter-three#791.

Co-authored-by: anRecky <45596261+Anrecky@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL