mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 15:53:30 +03:00
Fix assignment bug in projects service
This commit is contained in:
parent
ccc7405aa7
commit
94e2ce108a
@ -1,6 +1,6 @@
|
||||
import { invoke } from '$lib/backend/ipc';
|
||||
import type { Project as CloudProject } from '$lib/backend/cloud';
|
||||
import { BehaviorSubject, Observable, catchError, from, map, shareReplay, switchMap } from 'rxjs';
|
||||
import { BehaviorSubject, catchError, from, map, shareReplay, switchMap } from 'rxjs';
|
||||
|
||||
export type Key =
|
||||
| 'generated'
|
||||
@ -34,7 +34,7 @@ export class ProjectService {
|
||||
getProject(projectId: string) {
|
||||
return this.projects$.pipe(
|
||||
map((projects) => {
|
||||
const project = projects.find((p) => (p.id = projectId));
|
||||
const project = projects.find((p) => p.id == projectId);
|
||||
if (!project) {
|
||||
// We need to abort loading of /[projectId]/ if no project exists, such
|
||||
// that the type here is of Project rather than Project | undefined.
|
||||
|
Loading…
Reference in New Issue
Block a user