mirror of
https://github.com/BloopAI/vibe-kanban-web-companion.git
synced 2026-08-23 11:58:32 +00:00
dx: better error logging
This commit is contained in:
@@ -22,7 +22,10 @@ export function getSourceForElement(
|
||||
|
||||
function getFirstParentElementWithSource(element) {
|
||||
const parentElement = element.parentElement
|
||||
if (parentElement === null) throw new Error('No parent found')
|
||||
if (parentElement === null) {
|
||||
console.warn("Couldn't find a React instance for the element", element)
|
||||
throw new Error('No parent found for element')
|
||||
}
|
||||
|
||||
const instance = getReactInstanceForElement(parentElement)
|
||||
const source = getSourceForInstance(instance)
|
||||
|
||||
Reference in New Issue
Block a user