Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Jan 20, 2023
1 parent 3406f33 commit 416e1f4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/labs/gen-manifest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ import type * as cem from 'custom-elements-manifest/schema';
*/
const ifNotEmpty = <T>(v: T): T | undefined => {
if (
v === undefined ||
(typeof v === 'boolean' && v === false) ||
(typeof v === 'string' && v.length === 0) ||
(Array.isArray(v) && v.length === 0)
(v as unknown) === false ||
((typeof v === 'string' || Array.isArray(v)) && v.length === 0)
) {
return undefined;
}
Expand Down

0 comments on commit 416e1f4

Please sign in to comment.