Skip to content

Commit

Permalink
Format reference error message
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmunsters committed Feb 21, 2022
1 parent 84a3eff commit 9f4749a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boa/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,9 @@ impl Context {
let exists = self.global_bindings_mut().contains_key(&key);

if !exists && (self.strict() || self.vm.frame().code.strict) {
return self
.throw_reference_error(format!("assignment to undeclared variable {key}"));
return self.throw_reference_error(format!(
"assignment to undeclared variable {key}"
));
}

let success = crate::object::internal_methods::global::global_set_no_receiver(
Expand Down

0 comments on commit 9f4749a

Please sign in to comment.