mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -04:00
Fix some plugins wrongly displaying the settings cog
This commit is contained in:
parent
aecd9d8fda
commit
8614e17633
3 changed files with 14 additions and 4 deletions
|
@ -74,6 +74,16 @@ export function isObject(obj: unknown): obj is object {
|
|||
return typeof obj === "object" && obj !== null && !Array.isArray(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an object is empty or in other words has no own properties
|
||||
*/
|
||||
export function isObjectEmpty(obj: object) {
|
||||
for (const k in obj)
|
||||
if (Object.hasOwn(obj, k)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns null if value is not a URL, otherwise return URL object.
|
||||
* Avoids having to wrap url checks in a try/catch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue