Skip to content

Commit 82c68a5

Browse files
Share the ParseService#parse$ observable
Co-authored-by: Xander Vertegaal <73882506+XanderVertegaal@users.noreply.github.com>
1 parent 90b53c5 commit 82c68a5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/app/services/parse.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HttpClient } from '@angular/common/http';
22
import { inject, Injectable } from '@angular/core';
3-
import { Subject, switchMap, catchError, of, merge, map } from 'rxjs';
3+
import { Subject, switchMap, catchError, of, merge, map, share } from 'rxjs';
44
import { ParseInput } from '@/annotate/annotation-input/annotation-input.component';
55
import { ProblemService } from './problem.service';
66
import { ParseResponseData } from '@/types';
@@ -31,7 +31,8 @@ export class ParseService {
3131
return of({ data: null, error: error.message || "An error occurred while parsing the problem." });
3232
}),
3333
)
34-
)
34+
),
35+
share()
3536
);
3637

3738
public parse$ = merge(

0 commit comments

Comments
 (0)