Skip to content

Commit

Permalink
fix for totoro & build
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Mar 5, 2014
1 parent e514ef7 commit 2c81575
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions dist/sea-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function id2Uri(id, refUri) {
}


var doc = document
var doc = global.document
var cwd = dirname(doc.URL)
var scripts = doc.scripts

Expand Down Expand Up @@ -277,7 +277,7 @@ seajs.resolve = id2Uri
* ref: tests/research/load-js-css/test.html
*/

var head = doc.getElementsByTagName("head")[0] || doc.documentElement
var head = doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement
var baseElement = head.getElementsByTagName("base")[0]

var IS_CSS_RE = /\.css(?:\?|$)/i
Expand Down Expand Up @@ -534,7 +534,7 @@ Module.prototype.load = function() {
m = Module.get(uris[i])

if (m.status < STATUS.LOADED) {
// Maybe duplicate
// Maybe duplicate: When module has dupliate dependency, it should be it's count, not 1
m._waitings[mod.uri] = (m._waitings[mod.uri] || 0) + 1
}
else {
Expand Down Expand Up @@ -856,6 +856,7 @@ data.cid = cid
seajs.require = function(id) {
var mod = Module.get(Module.resolve(id))
if (mod.status < STATUS.EXECUTING) {
mod.onload()
mod.exec()
}
return mod.exports
Expand Down
2 changes: 1 addition & 1 deletion dist/sea.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ if (typeof document !== 'undefined') {
if (typeof location === 'undefined') {
return ''
}
if (location.search.indexOf('__order_id') > -1) {
return ''
}

return decodeURIComponent(location.search)
.replace(/&?t=\d+/, '').substring(1)
Expand Down

0 comments on commit 2c81575

Please sign in to comment.