Skip to content

Commit

Permalink
fix: changing validator not triggering an update in CodeMode
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed May 19, 2021
1 parent c681f2e commit 5b4866e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/modes/codemode/CodeMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
let jsonStatus = JSON_STATUS_VALID
let jsonParseError
function checkValidJson (text) {
function checkValidJson () {
jsonStatus = JSON_STATUS_VALID
jsonParseError = undefined
validationErrorsList = []
Expand Down Expand Up @@ -481,7 +481,10 @@
const checkValidJsonDebounced = debounce(checkValidJson, CHECK_VALID_JSON_DELAY)
// we pass unused arguments to trigger calling checkValidJson when text or validator changes
// TODO: find a better solution
$: checkValidJsonDebounced(text)
$: checkValidJson(validator)
$: repairActions = (jsonStatus === JSON_STATUS_REPAIRABLE)
? [{
Expand Down

0 comments on commit 5b4866e

Please sign in to comment.