mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2024-04-21 12:32:08 +00:00
fix (error): Uncaught Error: undefined node for selector '[data-bind=backend-enabled]'
This commit is contained in:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user