Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Commit

Permalink
site ContextInfo fix
Browse files Browse the repository at this point in the history
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);
})
  • Loading branch information
Tomi Tavela committed Dec 20, 2016
1 parent fcc6cf6 commit 5f7036a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sharepoint/rest/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Site extends QueryableInstance {
* Gets the context information for the site.
*/
public getContextInfo(): Promise<ContextInfo> {
let q = new Site("", "_api/contextinfo");
let q = new Site(this.parentUrl, "_api/contextinfo");
return q.post().then(data => {
if (data.hasOwnProperty("GetContextWebInformation")) {
let info = data.GetContextWebInformation;
Expand Down

0 comments on commit 5f7036a

Please sign in to comment.