mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 21:04:46 +01:00
fix (error): Uncaught Error: undefined node for selector '[data-bind=backend-enabled]'
This commit is contained in:
parent
fdd96adecb
commit
cf83f7507c
1 changed files with 1 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import { isAdmin$ } from "./model_admin_session.js";
|
|||
export default function AdminOnly(ctrlWrapped) {
|
||||
return (render) => {
|
||||
effect(isAdmin$().pipe(
|
||||
rxjs.distinctUntilChanged(),
|
||||
rxjs.map((isAdmin) => isAdmin ? ctrlWrapped : ctrlLogin),
|
||||
rxjs.tap((ctrl) => ctrl(render)),
|
||||
rxjs.catchError(ctrlError(render)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue