Skip to content

Commit

Permalink
Use parse instead of parseJSON. (#5869)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 authored Aug 8, 2023
1 parent a096f1a commit b56d75b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/static/js/admin/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const isJSONClean = (data) => {
// this is a bit naive. In theory some key/value might contain the sequences ',]' or ',}'
cleanSettings = cleanSettings.replace(',]', ']').replace(',}', '}');
try {
return typeof JSON.parseJSON(cleanSettings) === 'object';
return typeof JSON.parse(cleanSettings) === 'object';
} catch (e) {
return false; // the JSON failed to be parsed
}
Expand Down
2 changes: 1 addition & 1 deletion src/static/js/vendors/farbtastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $._farbtastic = function (container, options) {
fb.linkTo = function (callback) {
// Unbind previous nodes
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
Expand Down

0 comments on commit b56d75b

Please sign in to comment.