Skip to content

Conversation

moudhafersalhi
Copy link

Without the import @pnp/sp/files the methid _getFiles will fail as web.getFolderByServerRelativePath(folderRelativeUrl).files will be undefined and therfore the next .select will fail.

adding the import fixed the issue

Q A
Bug fix? [ X]
New feature? [ ]
New sample? [ ]
Related issues? fixes #X, partially #Y, mentioned in #Z

What's in this Pull Request?

Please describe the changes in this PR. Sample description or details around bugs which are being fixed.
When using the FolderExplorer with the option showFiles, the folderxplorer doesnt show the files + it shows the following error

Cannot read properties of undefined (reading 'select')

When investigating i found out that the import of pnp/sp/files was missing, which caused that the result of web.getFolderByServerRelativePath didnt contain a property files

Guidance

  • You can delete this section when you are submitting the pull request.
  • Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.
  • Please target your PR to dev branch.

Without the import @pnp/sp/files the methid _getFiles will fail as 
web.getFolderByServerRelativePath(folderRelativeUrl).files
will be undefined and therfore the next .select will fail.

adding the import fixed the issue
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the first contribution to this project.

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