Skip to content

Commit

Permalink
fix(runtime): fallback to early sprite mount when document.body appears
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #159
  • Loading branch information
kisenka committed Jul 28, 2017
1 parent 771e576 commit a71e67a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtime/browser-sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import domready from 'domready';

const sprite = new BrowserSprite();

domready(() => sprite.mount(document.body, true));
if (document.body) {
sprite.mount(document.body, true);
} else {
domready(() => sprite.mount(document.body, true));
}

export default sprite;

0 comments on commit a71e67a

Please sign in to comment.