Fixed issue with regional prompt state save.
parent
25e519ef05
commit
c32cdaa4df
|
|
@ -80,8 +80,11 @@ state.extensions['mask-regional-prompter'] = (function () {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
const currentValue = el.value;
|
const currentValue = el.value;
|
||||||
const storedValue = store.get(key);
|
const storedValue = store.get(key);
|
||||||
if (currentValue && currentValue !== storedValue && currentValue.length > 10) {
|
// Save if: value has changed AND (it's non-trivial OR we're clearing a non-empty stored value)
|
||||||
store.set(key, currentValue);
|
if (currentValue !== storedValue) {
|
||||||
|
if (currentValue.length > 10 || (currentValue === '' && storedValue && storedValue.length > 0)) {
|
||||||
|
store.set(key, currentValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue