Skip to content

Commit

Permalink
Fix graph content-types
Browse files Browse the repository at this point in the history
Fix issue with addCopyFromContentTypeHub where header is null and throw error in code. Now will return null as intended.
  • Loading branch information
juliemturner authored Feb 11, 2024
1 parent d84f391 commit afadd74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/graph/content-types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class _ContentTypes extends _GraphQueryableCollection<IContentTypeEntity[
public async addCopyFromContentTypeHub(contentTypeId: string): Promise<IContentTypeAddResult> {
const creator = ContentType(this, "addCopyFromContentTypeHub").using(JSONHeaderParse());
const data = await graphPost(creator, body({ contentTypeId }));
const pendingLocation = data.headers.location || null;
const pendingLocation = data?.headers?.location || null;
return {
data: data.data,
contentType: (<any>this).getById(data.id),
Expand Down

0 comments on commit afadd74

Please sign in to comment.