mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 22:42:33 +00:00
Bug fix
This commit is contained in:
parent
10318b2fab
commit
a7baff45fc
@ -59,12 +59,14 @@ const useData: UseData = (options, input, fetcherFn, swrOptions) => {
|
||||
swrOptions
|
||||
)
|
||||
|
||||
defineProperty(response, 'isLoading', {
|
||||
get() {
|
||||
return response.data === undefined
|
||||
},
|
||||
set: (x) => x,
|
||||
})
|
||||
if (!('isLoading' in response)) {
|
||||
defineProperty(response, 'isLoading', {
|
||||
get() {
|
||||
return response.data === undefined
|
||||
},
|
||||
set: (x) => x,
|
||||
})
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user