addressing type warnings; account for no-messages returned

This commit is contained in:
gingervitis
2020-12-29 14:59:43 -08:00
parent 422f37c477
commit 12201d0088
4 changed files with 17 additions and 5 deletions

View File

@@ -15,9 +15,10 @@ export function formatIPAddress(ipAddress: string): string {
// check if obj is {}
export function isEmptyObject(obj) {
return !obj || Object.keys(obj).length === 0;
return !obj || (Object.keys(obj).length === 0 && obj.constructor === Object);
}
export function parseSecondsToDurationString(seconds = 0) {
const finiteSeconds = Number.isFinite(+seconds) ? Math.abs(seconds) : 0;