default back to title and desc, and replace brs with new lines
This commit is contained in:
parent
3226556cd9
commit
307adcb81d
@ -278,7 +278,15 @@ class Toaster(Component):
|
||||
toast = ternary_operation(
|
||||
toast_ref.bool(),
|
||||
toast,
|
||||
FunctionVar("window.alert").call(message),
|
||||
FunctionVar("window.alert").call(
|
||||
Var.create(
|
||||
message
|
||||
if isinstance(message, str) and message
|
||||
else props.get("title", props.get("description", ""))
|
||||
)
|
||||
.to(str)
|
||||
.replace("<br/>", "\n")
|
||||
),
|
||||
)
|
||||
|
||||
return run_script(toast)
|
||||
|
Loading…
Reference in New Issue
Block a user