Cambié a mecanografiado y de repente algunos de mis códigos tienen errores con:
Object is possibly 'undefined'
La versión mecanografiada es 3.2.1
Aquí está el código:
this.$refs[`stud-copy-${index}`][0].innerHTML = 'Link Copied'Intenté agregar una condición if para verificar si no está definido, pero no tuve suerte:
if (this.$refs[`stud-copy-${index}`] !== undefined) { this.$refs[`stud-copy-${index}`][0].innerHTML = 'Link Copied' }puedes probar esto
(this.$refs[`stud-copy-${index}`] as HTMLElement[])[0].innerHTML = 'Link Copied'