guardian / scribe

DEPRECATED: A rich text editor framework for the web platform
http://guardian.github.io/scribe/
Apache License 2.0
3.51k stars 245 forks source link

Children search: return the root node for empty nodes #386

Closed rrees closed 9 years ago

rrees commented 9 years ago

This is my proposed fix to #368 that builds on the work of #376 but adds a small separation of code and a unit-test for the case that the Scribe content is empty.

I decided not to use a mock browser for the document substitution so this still isn't very testable for genuine tree traversal but it should address people's immediate problems.

hmgibson23 commented 9 years ago

Looks good :+1: