fix: general user settings empty when loading the settings page
Resolves https://kolaente.dev/vikunja/frontend/issues/2183
This commit is contained in:
parent
cb3f269937
commit
ff48178051
2 changed files with 28 additions and 8 deletions
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 a new issue