Skip to content
Snippets Groups Projects
Commit 8970451f authored by Dylan Noah Vairoli's avatar Dylan Noah Vairoli
Browse files

Merge branch 'dv/fix' into 'main'

Add error message on no UI found

See merge request !18
parents c59d6a2f 597c5f80
Branches main
Tags v0.10.0
No related merge requests found
......@@ -158,7 +158,9 @@ case class UIPage(appId: AppId, instanceId: InstanceId) extends Page:
WebClient.navigateTo(JoinPageLoader(appId, ui.uiId, instanceId))
def renderInto(target: Element) =
if appUIs.size <= 1 then
if appUIs.size <= 0 then
throw IllegalStateException(f"No UI found for app with id $appId.")
else if appUIs.size == 1 then
WebClient.navigateTo(JoinPageLoader(appId, appUIs(0).uiId, instanceId))
else replaceChildren(target):
dom.window.addEventListener("keydown", (e: dom.KeyboardEvent) => handleKeyboardEvent(e))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment