Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
raskad committed Feb 17, 2023
1 parent ca1b485 commit 1b29138
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions boa_engine/src/builtins/weak_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,7 @@ impl WeakMap {
// 5. For each Record { [[Key]], [[Value]] } p of entries, do
// a. If p.[[Key]] is not empty and SameValue(p.[[Key]], key) is true, return p.[[Value]].
// 6. Return undefined.
if let Some(value) = m.get(key.inner()) {
Ok(value)
} else {
Ok(JsValue::undefined())
}
Ok(m.get(key.inner()).unwrap_or_default())
}

/// `WeakMap.prototype.has ( key )`
Expand Down

0 comments on commit 1b29138

Please sign in to comment.