Browse Source

Keep accepting new array elements after spread. (#216)

pull/219/head
StackDoubleFlow 5 years ago committed by Jason Williams
parent
commit
85e9a35261
  1. 2
      src/lib/exec.rs

2
src/lib/exec.rs

@ -219,7 +219,7 @@ impl Executor for Interpreter {
let val = self.run(x)?; let val = self.run(x)?;
let mut vals = self.extract_array_properties(&val).unwrap(); let mut vals = self.extract_array_properties(&val).unwrap();
elements.append(&mut vals); elements.append(&mut vals);
break; // after spread we don't accept any new arguments continue; // Don't push array after spread
} }
elements.push(self.run(elem)?); elements.push(self.run(elem)?);
} }

Loading…
Cancel
Save