I see. How about the following fix?

```diff
 var next = exports.next = function() {
   var elem = this[0];
-  while ((elem = elem.next)) if (isTag(elem)) return this.make(elem);
+  while (elem && (elem = elem.next)) if (isTag(elem)) return this.make(elem);
   return this.make([]);
 };
```