mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
fixed ops conflicting with each other
This commit is contained in:
parent
0b72c5550b
commit
9424c293d7
2 changed files with 4 additions and 7 deletions
|
@ -395,9 +395,8 @@ fn apply_cmds<T, EF, N>(
|
|||
|
||||
cmds.ops.push(DiffOp::Clear);
|
||||
}
|
||||
|
||||
// We can optimize the case of replacing all items
|
||||
if !children.is_empty() && cmds.removing == children.len() {
|
||||
else if !items.is_empty() && cmds.removing == children.len() {
|
||||
children.clear();
|
||||
|
||||
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||
|
@ -476,7 +475,9 @@ fn apply_cmds<T, EF, N>(
|
|||
range.set_start_after(opening).unwrap();
|
||||
range.set_end_before(closing).unwrap();
|
||||
|
||||
range.delete_contents().unwrap();
|
||||
let contents = range.extract_contents().unwrap();
|
||||
|
||||
gloo::console::log!(contents);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -308,8 +308,6 @@ impl<El: IntoElement> HtmlElement<El> {
|
|||
if let Some(class) = class {
|
||||
let class = class.into();
|
||||
|
||||
debug!(new_class = ?class);
|
||||
|
||||
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||
if let Some(prev_class) = prev_run {
|
||||
let prev_class_set =
|
||||
|
@ -347,8 +345,6 @@ impl<El: IntoElement> HtmlElement<El> {
|
|||
|
||||
Some(class)
|
||||
} else {
|
||||
debug!(new_class = "None");
|
||||
|
||||
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||
if let Some(prev_class) = prev_run {
|
||||
for class in prev_class.split_ascii_whitespace() {
|
||||
|
|
Loading…
Reference in a new issue