mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
nodejs: message about error on json parse
This commit is contained in:
@ -161,7 +161,11 @@ if (typeof jQuery != "undefined") {
|
||||
url: requestAddress,
|
||||
complete: function (data) {
|
||||
var responseText = data.responseText;
|
||||
var response = jq.parseJSON(responseText);
|
||||
try {
|
||||
var response = jq.parseJSON(responseText);
|
||||
} catch (e) {
|
||||
response = { error: e };
|
||||
}
|
||||
if (response.error) {
|
||||
jq(".current").removeClass("current");
|
||||
jq(".step:not(.done)").addClass("error");
|
||||
|
||||
Reference in New Issue
Block a user