Skip to content

Commit

Permalink
fix(build): TS warning on a missing Type
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding-SE committed Jan 10, 2020
1 parent e1ce517 commit b894ee1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/modules/angular-slickgrid/editors/selectEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ export class SelectEditor implements Editor {
if (isRenderHtmlEnabled) {
// sanitize any unauthorized html tags like script and others
// for the remaining allowed tags we'll permit all attributes
const sanitizedText = DOMPurify.sanitize(optionText, sanitizedOptions);
const sanitizedText = (DOMPurify.sanitize(optionText, sanitizedOptions) || '').toString();
optionText = htmlEncode(sanitizedText);
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/angular-slickgrid/filters/selectFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export class SelectFilter implements Filter {
if (isRenderHtmlEnabled) {
// sanitize any unauthorized html tags like script and others
// for the remaining allowed tags we'll permit all attributes
const sanitizedText = DOMPurify.sanitize(optionText, sanitizedOptions);
const sanitizedText = (DOMPurify.sanitize(optionText, sanitizedOptions) || '').toString();
optionText = htmlEncode(sanitizedText);
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/angular-slickgrid/services/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function htmlDecode(encodedStr: string): string {
* Create a in-memory div, set it's inner text(which jQuery automatically encodes)
* then grab the encoded contents back out. The div never exists on the page.
*/
export function htmlEncode(inputValue: any): string {
export function htmlEncode(inputValue: string): string {
const entityMap = {
'&': '&',
'<': '&lt;',
Expand Down

0 comments on commit b894ee1

Please sign in to comment.