Skip to content

Commit 7e8df6d

Browse files
wip
1 parent 291125a commit 7e8df6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/htmldom/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ fn init_dom_parser_proxy(realm: &QuickJsRealmAdapter) -> Result<QuickJsValueAdap
407407
))
408408
} else {
409409
let doc = if args[0].is_string() {
410-
let html = args[0].to_str()?;
411-
parse_from_string(html)
410+
let html = args[0].to_string()?;
411+
parse_from_string(html.as_str())
412412
} else {
413413
let bytes = realm.copy_typed_array_buffer(&args[0])?;
414414
let html = String::from_utf8_lossy(bytes.as_slice());

0 commit comments

Comments
 (0)