Skip to content

Commit

Permalink
dont put js regexes in quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg committed May 15, 2024
1 parent dae0b49 commit 313c1f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/site/src/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function domDialog(o: DomDialogOpts): Promise<Dialog> {
}

const view = $as<HTMLElement>('<div class="dialog-content">');
if (o.class) view.classList.add(...o.class.split('/[. ]/').filter(x => x));
if (o.class) view.classList.add(...o.class.split(/[. ]/).filter(x => x));
for (const [k, v] of Object.entries(o.attrs?.view ?? {})) view.setAttribute(k, String(v));
if (html) view.innerHTML = html;

Expand Down

0 comments on commit 313c1f8

Please sign in to comment.