Skip to content

Commit bb757ec

Browse files
committed
Potential fix of #425
1 parent ef1a664 commit bb757ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/SPTermStorePickerService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export default class SPTermStorePickerService {
312312
return this.context.spHttpClient.post(this.clientServiceUrl, SPHttpClient.configurations.v1, httpPostOptions).then((serviceResponse: SPHttpClientResponse) => {
313313
return serviceResponse.json().then((serviceJSONResponse: any) => {
314314
// Retrieve the term collection results
315-
const termStoreResult: ITerms[] = serviceJSONResponse.filter((r: { [x: string]: string; }) => r['_ObjectType_'] === 'SP.Taxonomy.TermCollection');
315+
const termStoreResult: ITerms[] = serviceJSONResponse.filter((r: { [x: string]: string; }) => r && r['_ObjectType_'] === 'SP.Taxonomy.TermCollection');
316316
if (termStoreResult.length > 0) {
317317
// Retrieve all terms
318318

0 commit comments

Comments
 (0)