mirror of
https://github.com/samsonjs/gitter.git
synced 2026-04-27 15:07:41 +00:00
raw does not work with jsonp in the browser, disable it
This commit is contained in:
parent
22af769100
commit
dcae8398bf
1 changed files with 4 additions and 2 deletions
|
|
@ -79,7 +79,8 @@
|
||||||
commit: function(repo, sha, cb) {
|
commit: function(repo, sha, cb) {
|
||||||
return new Commit(repo, sha, cb)
|
return new Commit(repo, sha, cb)
|
||||||
},
|
},
|
||||||
raw: function(repo, sha, cb) {
|
// raw doesn't work with jsonp ... cors?
|
||||||
|
raw: isBrowser ? undefined : function(repo, sha, cb) {
|
||||||
return new Raw(repo, sha, cb)
|
return new Raw(repo, sha, cb)
|
||||||
},
|
},
|
||||||
repo: function(repo, cb) {
|
repo: function(repo, cb) {
|
||||||
|
|
@ -142,7 +143,8 @@
|
||||||
has: [ ['commits', 'commits/list/:repo/:branch'] ]
|
has: [ ['commits', 'commits/list/:repo/:branch'] ]
|
||||||
})
|
})
|
||||||
Commit = createResource('commits/show/:repo/:sha')
|
Commit = createResource('commits/show/:repo/:sha')
|
||||||
Raw = createResource('blob/show/:repo/:sha')
|
// raw doesn't work with jsonp ... cors?
|
||||||
|
if (!isBrowser) Raw = createResource('blob/show/:repo/:sha')
|
||||||
Repo = createResource('repos/show/:repo', {
|
Repo = createResource('repos/show/:repo', {
|
||||||
has: [ 'branches'
|
has: [ 'branches'
|
||||||
, 'collaborators'
|
, 'collaborators'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue