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

FileTypeIcon Errors Out and Crashes Page #1833

Open
1 of 3 tasks
evan-buss opened this issue Jun 12, 2024 · 2 comments
Open
1 of 3 tasks

FileTypeIcon Errors Out and Crashes Page #1833

evan-buss opened this issue Jun 12, 2024 · 2 comments

Comments

@evan-buss
Copy link

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!

Please check out the documentation to see if your question is already addressed there. This will help us ensure our documentation is up to date.

Category

  • Enhancement
  • Bug
  • Question

Version

Please specify what version of the library you are using: v3.18.1

If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.

Expected / Desired Behavior / Question

After upgrading to v3.18.1 I'm getting this error when trying to use the FileTypeIcon component.

TypeError: Cannot add property onClick, object is not extensible
    at FileTypeIcon.render 

Observed Behavior

I expected it to render the file icons based on the given path, but it crashes the page.

Steps to Reproduce

Using SPFX 1.19.0, import and use the FileTypIcon component:

  <FileTypeIcon type={IconType.image} path={file.Filename} />

This seems to be related to the additional props that were added to this component in v3.18.0? Pull Request

Thanks!

Copy link

Thank you for submitting your first issue to this project.

@evan-buss
Copy link
Author

I rolled back to SPFX 1.18.2 and it also has the same error and crashes the page.

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

No branches or pull requests

1 participant