Skip to content

Commit

Permalink
display content of check.php if json is not returned
Browse files Browse the repository at this point in the history
  • Loading branch information
kerphi committed Feb 28, 2013
1 parent 246e304 commit a830d19
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/jquery.phpfreechat.init.js
Expand Up @@ -58,6 +58,15 @@ var phpFreeChat = (function (pfc, $, window, undefined) {
type: 'GET',
url: pfc.options.serverCheckUrl
}).done(function (errors) {
// parse json
try {
if (errors instanceof String) {
errors = JSON.parse(errors);
}
} catch (err) {
errors = [ errors ];
}
// show errors if one
if (errors && errors.length > 0) {
pfc.showErrorsPopup(errors);
} else {
Expand Down

0 comments on commit a830d19

Please sign in to comment.