Skip to content

Commit

Permalink
fix (error): Uncaught Error: undefined node for selector '[data-bind=…
Browse files Browse the repository at this point in the history
…backend-enabled]'
  • Loading branch information
mickael-kerjean committed Jan 29, 2024
1 parent fdd96ad commit cf83f75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/assets/pages/adminpage/decorator_admin_only.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit cf83f75

Please sign in to comment.