Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use required: false rather than default: undefined for props #1450

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Aug 28, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

It feels like this might be a vue bug with prop type inference, but otherwise strange errors were occurring, e.g.:

<template>
  <NuxtImg
    v-if="uwuCookie"
    sizes="343px md:455px"
    width="455"
    height="256"
    class="mx-auto lg:my-16"
    src="/uwu.png"
    alt="Nuxt Logo in uwu style"
  />
</template>
pages/index.vue:86:9 - error TS2322: Type 'string' is not assignable to type 'undefined'.

86         sizes="343px md:455px"
           ~~~~~

https://github.com/nuxt/nuxt.com/actions/runs/10596463874/job/29364485513?pr=1650

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 61.95%. Comparing base (917242a) to head (e7de65c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1450   +/-   ##
=======================================
  Coverage   61.95%   61.95%           
=======================================
  Files          79       79           
  Lines        3609     3609           
  Branches      391      393    +2     
=======================================
  Hits         2236     2236           
  Misses       1343     1343           
  Partials       30       30           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@danielroe danielroe merged commit 92a6eee into main Aug 28, 2024
2 checks passed
@danielroe danielroe deleted the fix/prop-types branch August 28, 2024 12:31
This was referenced Aug 28, 2024
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