Skip to content

Commit a0654a7

Browse files
authored
fix: Toast cfg in ssr mode (#144)
1 parent dc1f984 commit a0654a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thaw/src/mobile/toast/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub struct ToastOptions {
99

1010
pub fn show_toast(options: ToastOptions) {
1111
mount_style("toast", include_str!("./toast.css"));
12-
cfg_if! { if #[cfg(target_arch = "wasm32")] {
12+
cfg_if! { if #[cfg(all(target_arch = "wasm32", any(feature = "csr", feature = "hydrate")))] {
1313
use leptos::{leptos_dom::Mountable, *};
1414
let mount = document().body().expect("body element to exist");
1515
let children = view! { <div class="thaw-toast">{options.message}</div> };

0 commit comments

Comments
 (0)