File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
components/svelte/src/lib Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 22
22
runs-on : ubuntu-latest
23
23
if : ${{ github.event_name != 'pull_request' }}
24
24
steps :
25
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
25
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
26
26
name : Checkout [main]
27
27
with :
28
28
fetch-depth : 0
63
63
runs-on : ubuntu-latest
64
64
if : ${{ github.event_name == 'pull_request' }}
65
65
steps :
66
- - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
66
+ - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
67
67
with :
68
68
ref : ${{ github.event.pull_request.head.ref }}
69
69
repository : ${{ github.event.pull_request.head.repo.full_name }}
Original file line number Diff line number Diff line change 9
9
let cssClass = ' ' ;
10
10
export { cssClass as class };
11
11
let canStart = false ;
12
+ let mounted = false ;
12
13
13
14
let style = ' ' ;
14
15
export { style };
15
16
export let options: ISourceOptions = {};
16
17
export let url = ' ' ;
17
18
export let id = ' tsparticles' ;
18
19
19
- const dispatch = createEventDispatcher (),
20
- particlesLoadedEvent = ' particlesLoaded' ;
20
+ const dispatch = createEventDispatcher <{
21
+ particlesLoaded: { container: Container }
22
+ }>(), particlesLoadedEvent = ' particlesLoaded' ;
21
23
22
24
let oldId = id ;
23
25
44
46
});
45
47
46
48
onMount (() => {
49
+ mounted = true ;
47
50
void loadParticles ();
48
51
});
49
52
50
53
async function loadParticles(): Promise <void > {
51
54
destroyOldContainer ();
52
55
53
- if (! canStart ) {
56
+ if (! canStart || ! mounted ) {
54
57
return ;
55
58
}
56
59
You can’t perform that action at this time.
0 commit comments