mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2024-04-21 12:32:08 +00:00
fix (connectpage): edge case with 0 backend selected
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user