// TODO: Remove when https://github.com/vuejs/core/issues/5513 fixed
constkey=ref(0)
constmessages=[
`Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.`,// chromium based
`NotFoundError: The object can not be found here.`,// safari
"Cannot read properties of null (reading 'parentNode')",
]
if(typeofwindow!=='undefined'){
// @ts-expect-error using arbitrary window key
if(!window.__ncvue){
window.addEventListener('error',(event)=>{
if(messages.includes(event.message)){
event.preventDefault()
console.warn('Re-rendering layout because of https://github.com/vuejs/core/issues/5513')