mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 21:04:46 +01:00
fix (connectpage): edge case with 0 backend selected
This commit is contained in:
parent
c1acc6fdc5
commit
16245a1b93
2 changed files with 7 additions and 1 deletions
|
|
@ -211,4 +211,11 @@ export default async function(render) {
|
|||
);
|
||||
}),
|
||||
));
|
||||
|
||||
// feature7: empty connection handling
|
||||
effect(connections$.pipe(
|
||||
rxjs.filter((conns) => conns.length === 0),
|
||||
rxjs.mergeMap((a) => Promise.reject(new Error("no backend selected"))),
|
||||
rxjs.catchError(ctrlError()),
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import rxjs from "../../lib/rx.js";
|
|||
const currentBackend$ = new rxjs.ReplaySubject(1);
|
||||
|
||||
export function setCurrentBackend(n) {
|
||||
console.log("SET: ", n);
|
||||
currentBackend$.next(n);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue