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

Commit

Permalink
Merge pull request #132 from jakemac53/patch-1
Browse files Browse the repository at this point in the history
Wrap the document, and handle null
  • Loading branch information
Steve Orvell committed Oct 1, 2014
2 parents 1f5e073 + a007bcd commit efdbbcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function handler(mutations) {

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

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

0 comments on commit efdbbcb

Please sign in to comment.