Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 5f7036a

Browse files
author
Tomi Tavela
authored
site ContextInfo fix
When accessing another site collection from the current context, the returned ContextInfo was still using the current context. new pnp.Site("https://contoso.sharepoint.com").getContextInfo().then((context: ContextInfo) => { console.log(context); })
1 parent fcc6cf6 commit 5f7036a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sharepoint/rest/site.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class Site extends QueryableInstance {
4141
* Gets the context information for the site.
4242
*/
4343
public getContextInfo(): Promise<ContextInfo> {
44-
let q = new Site("", "_api/contextinfo");
44+
let q = new Site(this.parentUrl, "_api/contextinfo");
4545
return q.post().then(data => {
4646
if (data.hasOwnProperty("GetContextWebInformation")) {
4747
let info = data.GetContextWebInformation;

0 commit comments

Comments
 (0)