Skip to content

FileTypeIcon Errors Out and Crashes Page #1833

Description

@evan-buss

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions