diff --git a/app/assets/javascripts/02-editor.js b/app/assets/javascripts/02-editor.js index 2fd0563..86ad7a8 100644 --- a/app/assets/javascripts/02-editor.js +++ b/app/assets/javascripts/02-editor.js @@ -352,7 +352,16 @@ function setupEditor (editorEl) { const range = sel.getRangeAt(0) for (const [name, type] of Object.entries(typesWithProperties)) { - const result = findRecursiveChild(type.checkFn, range.commonAncestorContainer) + let result + try { + result = findRecursiveChild(type.checkFn, range.commonAncestorContainer) + } catch (err) { + // Permission denied or something... + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Property_access_denied + console.log("Error raro", err) + break + } + if (result) { type.updateInput(result, editorEl) result.classList.add("selected")