fix for json parsing errors in safari
This commit is contained in:
parent
5ee998b263
commit
ea8f08e884
1 changed files with 1 additions and 12 deletions
|
@ -680,18 +680,6 @@ requires
|
||||||
|
|
||||||
function success(data) {
|
function success(data) {
|
||||||
pending[options.id] = false;
|
pending[options.id] = false;
|
||||||
try {
|
|
||||||
data = JSON.parse(data);
|
|
||||||
} catch (err) {
|
|
||||||
error({
|
|
||||||
status: {
|
|
||||||
code: 500,
|
|
||||||
text: "Internal Server Error"
|
|
||||||
},
|
|
||||||
data: {}
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
cache[req] = {
|
cache[req] = {
|
||||||
data: data,
|
data: data,
|
||||||
time: Ox.getTime()
|
time: Ox.getTime()
|
||||||
|
@ -716,6 +704,7 @@ requires
|
||||||
pending[options.id] = true;
|
pending[options.id] = true;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: options.data,
|
data: options.data,
|
||||||
|
dataType: "json",
|
||||||
error: error,
|
error: error,
|
||||||
success: success,
|
success: success,
|
||||||
timeout: options.timeout,
|
timeout: options.timeout,
|
||||||
|
|
Loading…
Reference in a new issue