mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Set input in with_document too when reuse engine (#474)
This commit is contained in:
@@ -316,7 +316,11 @@ impl Interpreter {
|
||||
}
|
||||
|
||||
pub fn set_input(&mut self, input: Value) {
|
||||
self.input = input;
|
||||
self.input = input.clone();
|
||||
// Update with_document["input"] too, in case if engine is being reused and was already prepared
|
||||
if let Ok(with_input) = Self::make_or_get_value_mut(&mut self.with_document, &["input"]) {
|
||||
*with_input = input;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn init_with_document(&mut self) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user