csdxz
This commit is contained in:
@@ -19,9 +19,9 @@ export class PrinterService {
|
||||
private http = inject(HttpClient);
|
||||
private log = inject(ErrorLoggerService);
|
||||
|
||||
get(id: Signal<string | null> | string | null): HttpResourceRef<Printer | undefined> {
|
||||
get(id: Signal<string | null>): HttpResourceRef<Printer | undefined> {
|
||||
return httpResource<Printer>(() => {
|
||||
const idVal = typeof id === 'function' ? id() : id;
|
||||
const idVal = id();
|
||||
return idVal === null || idVal === undefined ? url : `${url}/${idVal}`;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user