Fix possible new reference

This commit is contained in:
Adria Navarro 2024-04-26 15:52:39 +02:00
parent 1066c638df
commit 16ea4195df
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ const isBetterSample = (newValue, oldValue) => {
return true
}
if (oldValue != null && newValue == null) {
return false
}
// Don't change type
const oldType = typeof oldValue
const newType = typeof newValue