diff --git a/frontend/src/app/main/ui/error_boundary.cljs b/frontend/src/app/main/ui/error_boundary.cljs index 60b42b45c0..226b87369b 100644 --- a/frontend/src/app/main/ui/error_boundary.cljs +++ b/frontend/src/app/main/ui/error_boundary.cljs @@ -37,8 +37,20 @@ ;; If the error is a stale-asset error (cross-build ;; module mismatch), force a hard page reload instead ;; of showing the error page to the user. - (if (errors/stale-asset-error? error) + (cond + (errors/stale-asset-error? error) (cf/throttled-reload :reason (ex-message error)) + + ;; If the error is known to be harmless (browser + ;; extensions, React DOM conflicts, etc.), ignore it + ;; silently — the global uncaught-error-handler + ;; already does this, but react-error-boundary's + ;; onError fires independently of the window.onerror + ;; pipeline, so we must also filter here. + (errors/is-ignorable-exception? error) + nil + + :else (do (set! errors/last-exception error) (ex/print-throwable error) diff --git a/frontend/src/app/main/ui/notifications/context_notification.cljs b/frontend/src/app/main/ui/notifications/context_notification.cljs index 6777dddf64..99259ddb99 100644 --- a/frontend/src/app/main/ui/notifications/context_notification.cljs +++ b/frontend/src/app/main/ui/notifications/context_notification.cljs @@ -54,16 +54,16 @@ ;; The content can arrive in markdown format, in these cases ;; we will use the prop is-html to true to indicate it and ;; that the html injection is performed and the necessary css classes are applied. - [:div {:class (stl/css :context-text) - :dangerouslySetInnerHTML (when is-html #js {:__html content})} - (when-not is-html - [:* - content - (when (some? links) - (for [[index link] (d/enumerate links)] - ;; TODO Review this component - [:& lb/link-button {:class (stl/css :link) - :on-click (:callback link) - :value (:label link) - :key (dm/str "link-" index)}]))])]]) + (if is-html + [:div {:class (stl/css :context-text) + :dangerouslySetInnerHTML #js {:__html content}}] + [:div {:class (stl/css :context-text)} + content + (when (some? links) + (for [[index link] (d/enumerate links)] + ;; TODO Review this component + [:& lb/link-button {:class (stl/css :link) + :on-click (:callback link) + :value (:label link) + :key (dm/str "link-" index)}]))])])