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

toRelativeUrl returns proper relative url in case of root site #609

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

ramonitor
Copy link

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

What's in this Pull Request?

On a root site (i.e. https://customer.sharepoint.com) the toRelativeUrl helper now returns / instead of returning a relative url with // appended to the domain (//customer.sharepoint.com). On non-root sites the behaviour remains as-is.

@ramonitor
Copy link
Author

Note; this PR also fixes browser hanging issue with the regex replace on absolute URLs without trailing slash.

@joaojmendes joaojmendes self-assigned this Apr 17, 2024
@joaojmendes joaojmendes added this to the 3.17.0 milestone Apr 17, 2024
@joaojmendes joaojmendes added the status:fixed-next-drop Issue will be fixed in upcoming release. label Apr 17, 2024
@joaojmendes joaojmendes merged commit dd6938f into pnp:dev Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants