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: fromAbsolutePath methods reference undefined this #2857

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

RoelVB
Copy link
Contributor

@RoelVB RoelVB commented Dec 12, 2023

Category

  • Bug fix?
  • New feature?
  • New sample?
  • Documentation update?

Related Issues

No related issue.

When creating a File/Folder object based on the absolute path you would get the error:
Cannot read property '_url' of undefined, because the init value here would be undefined:

parent = init as Queryable<any>;
this._url = combine(parent._url, path);

What's in this Pull Request?

The methods fileFromAbsolutePath/folderFromAbsolutePath now use the base argument

@RoelVB RoelVB changed the title Fix: fromAbsolutePath methods referrence undefined this Fix: fromAbsolutePath methods reference undefined this Dec 12, 2023
@bcameron1231 bcameron1231 added this to the 3.22.0 milestone Dec 19, 2023
@patrick-rodgers
Copy link
Member

Thanks for submitting this fix! Can't believe no one caught it before, appreciate you taking the time to create the PR. Fix will go out in tonight's nightly build as well as the release planned for Jan 15th.

Thank you!

@patrick-rodgers patrick-rodgers merged commit 742b831 into pnp:version-3 Jan 8, 2024
1 check passed
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.

3 participants