Skip to content

Commit

Permalink
Mark xhr.status=0 as successful
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Gospodarets committed Apr 2, 2014
1 parent 9da952f commit 75247a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/markdown/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@

xhr.onreadystatechange = function() {
if( xhr.readyState === 4 ) {
if ( xhr.status >= 200 && xhr.status < 300 ) {
if (
(xhr.status >= 200 && xhr.status < 300) ||
xhr.status === 0 // file protocol yields status code 0 (useful for local debug, mobile applications etc.)
) {

section.outerHTML = slidify( xhr.responseText, {
separator: section.getAttribute( 'data-separator' ),
Expand Down

0 comments on commit 75247a8

Please sign in to comment.