Skip to content

Commit

Permalink
Merge pull request #35 from atifaziz/patch-1
Browse files Browse the repository at this point in the history
Don't break if no embedded Markdown found
  • Loading branch information
arturadib committed Apr 15, 2014
2 parents 444e1c9 + 59f5b26 commit 40b5aa0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/strapdown.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
;(function(window, document) {

// Hide body until we're done fiddling with the DOM
document.body.style.display = 'none';

//////////////////////////////////////////////////////////////////////
//
// Shims for IE < 9
Expand Down Expand Up @@ -34,6 +31,14 @@
scriptEls = document.getElementsByTagName('script'),
navbarEl = document.getElementsByClassName('navbar')[0];

if (!markdownEl) {
console.warn('No embedded Markdown found in this document for Strapdown.js to work on! Visit http://strapdownjs.com/ to learn more.');
return;
}

// Hide body until we're done fiddling with the DOM
document.body.style.display = 'none';

//////////////////////////////////////////////////////////////////////
//
// <head> stuff
Expand Down

0 comments on commit 40b5aa0

Please sign in to comment.