fix: general user settings empty when loading the settings page

Resolves https://kolaente.dev/vikunja/frontend/issues/2183
This commit is contained in:
kolaente 2022-07-21 16:11:45 +02:00
parent cb3f269937
commit ff48178051
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
2 changed files with 28 additions and 8 deletions

View 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
}