Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit efdbbcb

Browse files
author
Steve Orvell
committed
Merge pull request #132 from jakemac53/patch-1
Wrap the document, and handle null
2 parents 1f5e073 + a007bcd commit efdbbcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Observer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ function handler(mutations) {
293293

294294
function takeRecords(node) {
295295
// If the optional node is not supplied, assume we mean the whole document.
296-
if (node === undefined) node = document;
296+
if (!node) node = wrapIfNeeded(document);
297297

298298
// Find the root of the tree, which will be an Document or ShadowRoot.
299299
while (node.parentNode) {

0 commit comments

Comments
 (0)