mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Use parse instead of parseJSON. (#5869)
This commit is contained in:
parent
a096f1ae33
commit
b56d75b1e9
2 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ const isJSONClean = (data) => {
|
||||||
// this is a bit naive. In theory some key/value might contain the sequences ',]' or ',}'
|
// this is a bit naive. In theory some key/value might contain the sequences ',]' or ',}'
|
||||||
cleanSettings = cleanSettings.replace(',]', ']').replace(',}', '}');
|
cleanSettings = cleanSettings.replace(',]', ']').replace(',}', '}');
|
||||||
try {
|
try {
|
||||||
return typeof JSON.parseJSON(cleanSettings) === 'object';
|
return typeof JSON.parse(cleanSettings) === 'object';
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false; // the JSON failed to be parsed
|
return false; // the JSON failed to be parsed
|
||||||
}
|
}
|
||||||
|
|
2
src/static/js/vendors/farbtastic.js
vendored
2
src/static/js/vendors/farbtastic.js
vendored
|
@ -33,7 +33,7 @@ $._farbtastic = function (container, options) {
|
||||||
fb.linkTo = function (callback) {
|
fb.linkTo = function (callback) {
|
||||||
// Unbind previous nodes
|
// Unbind previous nodes
|
||||||
if (typeof fb.callback == 'object') {
|
if (typeof fb.callback == 'object') {
|
||||||
$(fb.callback).off('keyup').on('keyup').on('keyup', fb.updateValue);
|
$(fb.callback).off('keyup').on('keyup', fb.updateValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset color
|
// Reset color
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue