Fix full-page rendering

Closes #337.

Test Plan:
Opened react-page sample without any JS errors. Also ran grunt test after cherry-picking this changeset on top of #338.
Merge pull request #339 from spicyj/doc-rendering

Fix full-page rendering