Skip to content
Snippets Groups Projects
Commit 75247a88 authored by Sergey Gospodarets's avatar Sergey Gospodarets
Browse files

Mark xhr.status=0 as successful

parent 9da952fe
No related branches found
No related tags found
No related merge requests found
...@@ -219,7 +219,10 @@ ...@@ -219,7 +219,10 @@
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
if( xhr.readyState === 4 ) { 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, { section.outerHTML = slidify( xhr.responseText, {
separator: section.getAttribute( 'data-separator' ), separator: section.getAttribute( 'data-separator' ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment