mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-24 18:21:33 +00:00
Fix return type of WebIDL indexing getters (#1789)
* Wrap the return type of indexing getters as Option<T> if necessary. * Update tests for indexing getters * Fix typo * Add comments describing what the code segment is doing * Update indexing getter usage * Revert "Add comments describing what the code segment is doing" This reverts commit 624a14c0fffb78e8eaed21658ddddbad70b2462d. * Revert "Fix typo" This reverts commit 487fc307bc08c2a7778b2117fb03f0f5eb5a3c18. * Revert "Wrap the return type of indexing getters as Option<T> if necessary." This reverts commit 547f3dd36c1182928ff728a8452591a492b65e21. * Update the return signatures of WebIDL indexing getters
This commit is contained in:
@ -294,7 +294,9 @@ impl Element {
|
||||
if let Some(el) = self.el.take() {
|
||||
{
|
||||
if let Some(el) = wasm_bindgen::JsCast::dyn_ref::<web_sys::HtmlElement>(&el) {
|
||||
text = el.dataset().get(key);
|
||||
if let Some(value) = el.dataset().get(key) {
|
||||
text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
self.el = Some(el);
|
||||
|
Reference in New Issue
Block a user