We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7aa652b commit 24de062Copy full SHA for 24de062
wasm/src/lib.rs
@@ -80,7 +80,11 @@ pub fn inline(
80
html: &str,
81
options: JsValue,
82
) -> Result<String, JsValue> {
83
- let options: WasmOptions = options.into_serde().map_err(SerdeError)?;
+ let options: Options = if !options.is_undefined() {
84
+ options.into_serde().map_err(SerdeError)?
85
+ } else {
86
+ Options::default()
87
+ };
88
let inliner = rust_inline::CSSInliner::new(options.try_into()?);
89
Ok(inliner.inline(html).map_err(InlineErrorWrapper)?)
90
}
0 commit comments