Skip to content

Commit

Permalink
fix page templates loading in ios 9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
qathom committed Nov 28, 2015
1 parent 68fcff9 commit 109eb25
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.1.1 (2015-11-28)

#### Bug Fixes

* page templates fix: XMLHttpRequest does not return a status code when accessing local files in iOS 9.1 [#41](https://github.com/quark-dev/Phonon-Framework/issues/41)

### 1.1.0 (2015-11-25)

#### Bug Fixes
Expand Down
4 changes: 3 additions & 1 deletion dist/js/phonon-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,9 @@ phonon.tagManager = (function () {
var req = new XMLHttpRequest();
if(req.overrideMimeType) req.overrideMimeType('text/html; charset=utf-8');
req.onreadystatechange = function() {
if (req.readyState === 4 && req.status === 200) fn(req.responseText);
if(req.readyState === 4 && (req.status === 200 || !req.status && req.responseText.length)) {
fn(req.responseText, opts, url);
}
};
req.open('GET', opts.templateRootDirectory + url, true);
req.send('');
Expand Down
2 changes: 1 addition & 1 deletion dist/js/phonon-core.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dist/js/phonon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,9 @@ phonon.tagManager = (function () {
var req = new XMLHttpRequest();
if(req.overrideMimeType) req.overrideMimeType('text/html; charset=utf-8');
req.onreadystatechange = function() {
if (req.readyState === 4 && req.status === 200) fn(req.responseText);
if(req.readyState === 4 && (req.status === 200 || !req.status && req.responseText.length)) {
fn(req.responseText, opts, url);
}
};
req.open('GET', opts.templateRootDirectory + url, true);
req.send('');
Expand Down
4 changes: 2 additions & 2 deletions dist/js/phonon.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/js/core/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@
var req = new XMLHttpRequest();
if(req.overrideMimeType) req.overrideMimeType('text/html; charset=utf-8');
req.onreadystatechange = function() {
if (req.readyState === 4 && req.status === 200) fn(req.responseText);
if(req.readyState === 4 && (req.status === 200 || !req.status && req.responseText.length)) {
fn(req.responseText, opts, url);
}
};
req.open('GET', opts.templateRootDirectory + url, true);
req.send('');
Expand Down

0 comments on commit 109eb25

Please sign in to comment.