mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 14:33:03 +00:00
[DURACOM-240] refactor variable
This commit is contained in:

committed by
Giuseppe Digilio

parent
e402ac482d
commit
e1ba78c443
@@ -16,7 +16,7 @@ import {
|
||||
})
|
||||
export class ClientMathService extends MathService {
|
||||
|
||||
protected signal: Subject<boolean>;
|
||||
protected isReady$: Subject<boolean>;
|
||||
|
||||
protected mathJaxOptions = {
|
||||
tex: {
|
||||
@@ -42,14 +42,13 @@ export class ClientMathService extends MathService {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.signal = new ReplaySubject<boolean>(1);
|
||||
this.isReady$ = new ReplaySubject<boolean>(1);
|
||||
|
||||
void this.registerMathJaxAsync(this.mathJax)
|
||||
.then(() => this.signal.next(true))
|
||||
.then(() => this.isReady$.next(true))
|
||||
.catch(_ => {
|
||||
void this.registerMathJaxAsync(this.mathJaxFallback)
|
||||
.then(() => this.signal.next(true))
|
||||
.catch((error) => console.log(error));
|
||||
.then(() => this.isReady$.next(true));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,7 +76,7 @@ export class ClientMathService extends MathService {
|
||||
}
|
||||
|
||||
ready(): Observable<boolean> {
|
||||
return this.signal;
|
||||
return this.isReady$;
|
||||
}
|
||||
|
||||
render(element: HTMLElement) {
|
||||
|
Reference in New Issue
Block a user