IntegerAlex / IntegerAlex/disposable-email-detector

[BUG] throws TS2532: Object is possibly 'undefined' at index.ts:58

Open
#7 1 comment 1 reaction 2 assignees Claimed by @IntegerAlex View on GitHub
Dominant language
TypeScript
Stars
34
Forks
7
PR merge metrics
No merged PRs in 30d

Description

While building my project using TypeScript, I encountered the following error from the disposable-email-detector package:

../../node_modules/.pnpm/disposable-email-detector@3.0.0/node_modules/disposable-email-detector/index.ts:58:20 - error TS2532: Object is possibly 'undefined'.

const domain = email.split('@')[1].toLowerCase();
// Get the domain part of the email address and convert it to lowercase

This happens during the build process:

> @/helpers@0.0.1 build
> tsc
...
error TS2532: Object is possibly 'undefined'

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.