useScriptTag
child component unload
removes parent component tag when same src
.
#2027
Closed
7 tasks done
Describe the bug
load
get the existing elementvueuse/packages/core/useScriptTag/index.ts
Line 101 in 8b21ca2
unload
deletes the elementvueuse/packages/core/useScriptTag/index.ts
Lines 174 to 176 in 8b21ca2
If there is two component using the same script, the child component will remove the parent script.
if the component is self referencing, on child component unmounted, the parent script will be removed.
It can be addressed by managing a list of usages, the last unmounted removes the tag.
Reproduction
as above.
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: