Skip to content

Commit b894ee1

Browse files
committed
fix(build): TS warning on a missing Type
1 parent e1ce517 commit b894ee1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/app/modules/angular-slickgrid/editors/selectEditor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ export class SelectEditor implements Editor {
562562
if (isRenderHtmlEnabled) {
563563
// sanitize any unauthorized html tags like script and others
564564
// for the remaining allowed tags we'll permit all attributes
565-
const sanitizedText = DOMPurify.sanitize(optionText, sanitizedOptions);
565+
const sanitizedText = (DOMPurify.sanitize(optionText, sanitizedOptions) || '').toString();
566566
optionText = htmlEncode(sanitizedText);
567567
}
568568

src/app/modules/angular-slickgrid/filters/selectFilter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ export class SelectFilter implements Filter {
378378
if (isRenderHtmlEnabled) {
379379
// sanitize any unauthorized html tags like script and others
380380
// for the remaining allowed tags we'll permit all attributes
381-
const sanitizedText = DOMPurify.sanitize(optionText, sanitizedOptions);
381+
const sanitizedText = (DOMPurify.sanitize(optionText, sanitizedOptions) || '').toString();
382382
optionText = htmlEncode(sanitizedText);
383383
}
384384

src/app/modules/angular-slickgrid/services/utilities.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function htmlDecode(encodedStr: string): string {
6363
* Create a in-memory div, set it's inner text(which jQuery automatically encodes)
6464
* then grab the encoded contents back out. The div never exists on the page.
6565
*/
66-
export function htmlEncode(inputValue: any): string {
66+
export function htmlEncode(inputValue: string): string {
6767
const entityMap = {
6868
'&': '&',
6969
'<': '&lt;',

0 commit comments

Comments
 (0)