Skip to content

Commit

Permalink
fix(service): implements now Angular Sanitizer insted of extending it…
Browse files Browse the repository at this point in the history
… to prevent problems in Ivy projects
  • Loading branch information
MarsiBarsi committed Mar 11, 2020
1 parent d9c21e3 commit 2e7f7a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions projects/ng-dompurify/src/lib/ng-dompurify.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const createDOMPurify = dompurify;
@Injectable({
providedIn: 'root',
})
export class NgDompurifySanitizer extends Sanitizer {
export class NgDompurifySanitizer implements Sanitizer {
private readonly domPurify: DOMPurifyI;

constructor(
Expand All @@ -38,8 +38,6 @@ export class NgDompurifySanitizer extends Sanitizer {
@Inject(DOMPURIFY_HOOKS)
hooks: ReadonlyArray<NgDompurifyHook>,
) {
super();

this.domPurify = createDOMPurify(defaultView as Window);
this.domPurify.addHook(
'uponSanitizeElement',
Expand Down

0 comments on commit 2e7f7a7

Please sign in to comment.