Skip to content

Commit

Permalink
phonon v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
qathom committed Sep 25, 2015
1 parent f981af4 commit 272c3fb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 1.0.4 (2015-09-25)

#### Bug Fixes

* Fixes navigator defensive condition before changing page
* Use JSON.stringify to process xhr's body when content-type is application/json

### 1.0.3 (2015-09-21)

#### Bug Fixes
Expand Down
5 changes: 3 additions & 2 deletions dist/js/phonon-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ phonon.ajax = (function () {

if(typeof method !== 'string') throw new TypeError('method must be a string');
if(typeof url !== 'string') throw new TypeError('url must be a string');
if(typeof data === 'object') data = objToString(data);
if(typeof data === 'object') data = contentType==="application/json"?JSON.stringify(data):objToString(data);
if(typeof success !== 'function') throw new TypeError('success must be a function');

var xhr = createXhr(crossDomain);
Expand Down Expand Up @@ -1684,7 +1684,8 @@ phonon.tagManager = (function () {
if(currentPageObject.async) {
callClose(currentPage, pageObject.name, hash);
} else {
if(window.location.hash.indexOf(pageObject.name) === -1 && opts.useHash) {
var parsed = window.location.hash.split('/');
if(parsed[0].indexOf(pageObject.name) === -1 && opts.useHash) {
window.location.hash = hash;
}
}
Expand Down
Loading

0 comments on commit 272c3fb

Please sign in to comment.