1
Fork 0

Properly restore snapshot when failing to recover parsing ternary

This commit is contained in:
clubby789 2023-10-26 11:11:36 +00:00
parent 056f5b0f13
commit 041f0313cf
3 changed files with 20 additions and 9 deletions

View file

@ -1454,13 +1454,11 @@ impl<'a> Parser<'a> {
}
Err(err) => {
err.cancel();
self.restore_snapshot(snapshot);
}
};
}
} else {
self.restore_snapshot(snapshot);
};
}
self.restore_snapshot(snapshot);
false
}