Skip to content

Commit

Permalink
querySelector might return null #9917
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Nov 6, 2023
1 parent d9c3c3b commit e58d3ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class NaturalSeoService {

private updateLinkTag(definition: NaturalLinkDefinition): void {
const linkElement =
<HTMLLinkElement>this.document.head.querySelector(this.parseSelector(definition)) ||
this.document.head.querySelector<HTMLLinkElement>(this.parseSelector(definition)) ||
this.document.head.appendChild(this.document.createElement('link'));

if (linkElement) {
Expand Down

0 comments on commit e58d3ac

Please sign in to comment.