Skip to content

Commit 20e1f97

Browse files
author
Andrea Barbasso
committed
[UXP-114] refactor variable
1 parent c90651f commit 20e1f97

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/app/core/shared/client-math.service.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { MathJaxConfig, MathService } from './math.service';
88
})
99
export class ClientMathService extends MathService {
1010

11-
protected signal: Subject<boolean>;
11+
protected isReady$: Subject<boolean>;
1212

1313
protected mathJaxOptions = {
1414
tex: {
@@ -34,14 +34,13 @@ export class ClientMathService extends MathService {
3434
constructor() {
3535
super();
3636

37-
this.signal = new ReplaySubject<boolean>();
37+
this.isReady$ = new ReplaySubject<boolean>();
3838

3939
void this.registerMathJaxAsync(this.mathJax)
40-
.then(() => this.signal.next(true))
40+
.then(() => this.isReady$.next(true))
4141
.catch(_ => {
4242
void this.registerMathJaxAsync(this.mathJaxFallback)
43-
.then(() => this.signal.next(true))
44-
.catch((error) => console.log(error));
43+
.then(() => this.isReady$.next(true));
4544
});
4645
}
4746

@@ -69,7 +68,7 @@ export class ClientMathService extends MathService {
6968
}
7069

7170
ready(): Observable<boolean> {
72-
return this.signal;
71+
return this.isReady$;
7372
}
7473

7574
render(element: HTMLElement) {

0 commit comments

Comments
 (0)