Skip to content

Commit 22a2f29

Browse files
committed
fix: test for pageContext.cultureinfo before use
1 parent 49998e6 commit 22a2f29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/SPTermStorePickerService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,10 @@ export default class SPTermStorePickerService {
424424
resolve(null);
425425
return;
426426
}
427-
427+
428428
let data = {
429429
start: searchText,
430-
lcid: LocalesHelper.getLocaleId(this.context.pageContext.cultureInfo.currentUICultureName) ?? this.context.pageContext.web.language,
430+
lcid: LocalesHelper.getLocaleId(this.context.pageContext.cultureInfo?.currentUICultureName) ?? this.context.pageContext.web.language,
431431

432432
sspList: this.cleanGuid(termStore[0].Id),
433433
termSetList: TermSetId,

0 commit comments

Comments
 (0)