Fix #4504 where dx fmt fails on eval of JS that contains empty line. (#4506)

https://github.com/DioxusLabs/dioxus/issues/4504

Co-authored-by: Nils Loewen <nils@blockrewards.ca>
This commit is contained in:
Nils LoewenandNils Loewen authored and GitHub committed 2025-10-03 20:00:38 -07:00
1 parent d0c4376790
commit 022124e512
1 file changed
+1 -1
+1 -1
View File
@@ -164,7 +164,7 @@ fn unwrapped(raw: String) -> String {
.strip_suffix("}\n")
.unwrap()
.lines()
.map(|line| line.strip_prefix(" ").unwrap()) // todo: set this to tab level
.map(|line| line.strip_prefix(" ").unwrap_or_default()) // todo: set this to tab level
.collect::<Vec<_>>()
.join("\n");