Skip to content

Commit

Permalink
Merge pull request #36 from spectjs/prototypeof-patch
Browse files Browse the repository at this point in the history
Fix prototype instance check
  • Loading branch information
keithamus authored Dec 16, 2021
2 parents 183c8cb + 8bf5ea2 commit 286546c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/template-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class TemplateInstance extends DocumentFragment {
// This is to fix an inconsistency in Safari which prevents us from
// correctly sub-classing DocumentFragment.
// https://bugs.webkit.org/show_bug.cgi?id=195556
if (Object.getPrototypeOf(this !== TemplateInstance.prototype)) {
if (Object.getPrototypeOf(this) !== TemplateInstance.prototype) {
Object.setPrototypeOf(this, TemplateInstance.prototype)
}
this.appendChild(template.content.cloneNode(true))
Expand Down

0 comments on commit 286546c

Please sign in to comment.