fix: stop pointless history entry creation in version combobox
This commit is contained in:
parent
465273987d
commit
620f15aaed
1 changed files with 3 additions and 0 deletions
|
|
@ -44,6 +44,9 @@ function VersionCombobox({ version, setVersion, isContext }: Props) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setVersion((prev) => {
|
setVersion((prev) => {
|
||||||
|
// If the previous and current values are the same, return
|
||||||
|
if (numberToVersion(prev) == comboboxValue) return prev;
|
||||||
|
|
||||||
if (isContext) {
|
if (isContext) {
|
||||||
const oldVersion = prev;
|
const oldVersion = prev;
|
||||||
addHistory(
|
addHistory(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue