mirror of
https://github.com/outline/outline.git
synced 2026-11-29 16:40:27 +03:00
Guard against empty error messages
This commit is contained in:
1 parent
67ed017122
commit
8b639682ff
1 file changed
+2
@@ -88,6 +88,8 @@ class UiStore {
|
||||
message: string,
|
||||
type?: 'warning' | 'error' | 'info' | 'success' = 'success'
|
||||
) => {
|
||||
if (!message) return;
|
||||
|
||||
const id = v4();
|
||||
const createdAt = new Date().toISOString();
|
||||
this.toasts.set(id, { message, type, createdAt, id });
|
||||
|
||||
Reference in new issue
Block a user