fix: general user settings empty when loading the settings page
Resolves https://kolaente.dev/vikunja/frontend/issues/2183
This commit is contained in:
6
src/helpers/objectIsEmpty.ts
Normal file
6
src/helpers/objectIsEmpty.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// https://stackoverflow.com/a/32108184/10924593
|
||||
export function objectIsEmpty(obj: any): boolean {
|
||||
return obj
|
||||
&& Object.keys(obj).length === 0
|
||||
&& Object.getPrototypeOf(obj) === Object.prototype
|
||||
}
|
Reference in New Issue
Block a user