Skip to content

Fix issue when option isn't passed#61

Merged
davidjamesstone merged 1 commit intomainfrom
fix/consumer-view-context-undefined
May 2, 2025
Merged

Fix issue when option isn't passed#61
davidjamesstone merged 1 commit intomainfrom
fix/consumer-view-context-undefined

Conversation

@davidjamesstone
Copy link
Copy Markdown
Contributor

Proposed change

When viewContext isn't provided, it defaults to undefined but exists as a key.
This change checks viewContext is callable.

I'll create a separate ticket to validate plugin options with joi, like all good hapi plugins do

Azure DevOps work item:

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • [] You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2025

@alexluckett
Copy link
Copy Markdown
Contributor

I'll create a separate ticket to validate plugin options with joi, like all good hapi plugins do

I was thinking the same thing today while I tried migrating FCP over. Would be handy.

@davidjamesstone davidjamesstone merged commit 5681821 into main May 2, 2025
11 checks passed
@davidjamesstone davidjamesstone deleted the fix/consumer-view-context-undefined branch May 2, 2025 15:43
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.

2 participants