mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
strip off trailing commas
This commit is contained in:
parent
fb69e6b0a3
commit
7550be0921
1 changed files with 2 additions and 0 deletions
|
@ -55,6 +55,8 @@ $(document).ready(function () {
|
||||||
|
|
||||||
function isJSONClean(data){
|
function isJSONClean(data){
|
||||||
var cleanSettings = JSON.minify(data);
|
var cleanSettings = JSON.minify(data);
|
||||||
|
// this is a bit naive. In theory some key/value might contain the sequences ',]' or ',}'
|
||||||
|
cleanSettings = cleanSettings.replace(",]","]").replace(",}","}");
|
||||||
try{
|
try{
|
||||||
var response = jQuery.parseJSON(cleanSettings);
|
var response = jQuery.parseJSON(cleanSettings);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue