Add default for options in $.ajax.

Fixes bugs caused by 8aa780cc33333e543b741f878098c3b2b142b7cd.
This commit is contained in:
ccd0 2015-11-15 20:51:27 -08:00
parent df3f0f9f7e
commit 0575eb2a79

View File

@ -53,7 +53,7 @@ $.ajax = do ->
) %>
$('span', message).textContent = (if /^\/\//.test url then location.protocol else '') + url
new Notice 'error', message, 30, -> delete blockedURLs[url]
(url, options, extra={}) ->
(url, options={}, extra={}) ->
{type, whenModified, upCallbacks, form} = extra
r = new XMLHttpRequest()
type or= form and 'post' or 'get'