opencast / opencast-admin-interface

A modern admin user interface for Opencast
https://admin-interface.opencast.org/
Educational Community License v2.0
1 stars 22 forks source link

Fix type error for missing organization property #715

Closed lkiesow closed 5 days ago

lkiesow commented 1 week ago

If an organization property does not exist, the admin interface completely breaks in some cases. This seems to happen on admin-interface.opencast.org right now:

Uncaught TypeError: u.toLowerCase is not a function
    qr Footer.tsx:25
    React 8
    D scheduler.production.min.js:13
    $ scheduler.production.min.js:14
Footer.tsx:25:80

What's interesting is that this only seems to happen with the compiled code. Starting the development server, calling toLowerCase() just works.

In any case, this patch fixes the issue by providing the default value first, so that toLowerCase() is always called on a string.

github-actions[bot] commented 1 week ago

This pull request is deployed at test.admin-interface.opencast.org/715/2024-06-19_15-47-48/ . It might take a few minutes for it to become available.

github-actions[bot] commented 1 week ago

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-715

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-715

It may take a few seconds for the interface to spin up. It will then be available at http://127.0.0.1:3000. For more options you can pass on to the proxy, take a look at the README.md.