Skip to content

Commit

Permalink
fix: use isElement util for unobserve
Browse files Browse the repository at this point in the history
  • Loading branch information
TremayneChrist committed Mar 4, 2020
1 parent 8a86818 commit 3a99b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ResizeObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ResizeObserver {
if (arguments.length === 0) {
throw new TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`)
}
if (target instanceof Element === false) {
if (!isElement(target)) {
throw new TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);
}
ResizeObserverController.unobserve(this, target);
Expand Down

0 comments on commit 3a99b98

Please sign in to comment.