Fix #873, regenerate minified variants.
Drive-by fix: uppercase tag name in failing m.trust test (doesn't make it pass, though).
This commit is contained in:
parent
747ba7e6d9
commit
cb29a21ec3
5 changed files with 49 additions and 14 deletions
17
mithril.js
17
mithril.js
|
|
@ -2115,7 +2115,7 @@ void (function (global, factory) { // eslint-disable-line
|
|||
options.onload = options.onerror = function (ev) {
|
||||
ev = ev || event
|
||||
var doSuccess = ev.type === "load"
|
||||
var unwrap, response
|
||||
var unwrap
|
||||
|
||||
if (doSuccess) {
|
||||
unwrap = options.unwrapSuccess
|
||||
|
|
@ -2124,7 +2124,7 @@ void (function (global, factory) { // eslint-disable-line
|
|||
}
|
||||
|
||||
try {
|
||||
response = (unwrap || identity)(
|
||||
var response = (unwrap || identity)(
|
||||
deserialize(extract(ev.target, options)), ev.target)
|
||||
if (doSuccess) {
|
||||
if (isArray(response) && options.type) {
|
||||
|
|
@ -2134,16 +2134,15 @@ void (function (global, factory) { // eslint-disable-line
|
|||
} else if (options.type) {
|
||||
response = new options.type(response)
|
||||
}
|
||||
deferred.resolve(response)
|
||||
} else {
|
||||
deferred.reject(response)
|
||||
}
|
||||
} catch (e) {
|
||||
m.deferred.onerror(e)
|
||||
response = e
|
||||
doSuccess = false
|
||||
deferred.reject(e)
|
||||
} finally {
|
||||
if (options.background !== true) m.endComputation()
|
||||
}
|
||||
|
||||
deferred[doSuccess ? "resolve" : "reject"](response)
|
||||
|
||||
if (options.background !== true) m.endComputation()
|
||||
}
|
||||
|
||||
ajax(options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue