diff --git a/stable.user.js b/stable.user.js index e566b99..eb8e57d 100755 --- a/stable.user.js +++ b/stable.user.js @@ -418,7 +418,7 @@ criteria: () => { const firstChild = document.getElementsByTagName('form')[1].childNodes[0].childNodes[0] - if (!firstChild || !firstChild.className.includes('informationitem')) { + if (!firstChild.className.includes('informationitem')) { return false } const questionNodes = Array.from( @@ -758,7 +758,13 @@ let resultNodes Object.keys(resultNodeVariants).some((key) => { const variant = resultNodeVariants[key] - if (variant.criteria()) { + let criteriaPassed = false + try { + criteriaPassed = variant.criteria() + } catch (e) { + debugLog('Criteria check failed with error', e) + } + if (criteriaPassed) { resultNodes = variant.getter() if (resultNodes.length === 0) { warn(