don't call localStorage on server
This commit is contained in:
parent
41323883a5
commit
e6c693f241
|
@ -127,10 +127,10 @@ function InputInner ({
|
||||||
if (overrideValue) {
|
if (overrideValue) {
|
||||||
helpers.setValue(overrideValue)
|
helpers.setValue(overrideValue)
|
||||||
if (storageKey) {
|
if (storageKey) {
|
||||||
localStorage.setItem(storageKey, overrideValue)
|
localStorage?.setItem(storageKey, overrideValue)
|
||||||
}
|
}
|
||||||
} else if (storageKey) {
|
} else if (storageKey) {
|
||||||
const draft = localStorage.getItem(storageKey)
|
const draft = localStorage?.getItem(storageKey)
|
||||||
if (draft) {
|
if (draft) {
|
||||||
// for some reason we have to turn off validation to get formik to
|
// for some reason we have to turn off validation to get formik to
|
||||||
// not assume this is invalid
|
// not assume this is invalid
|
||||||
|
|
Loading…
Reference in New Issue