8000 type check allows nil · Issue #162 · mt-mods/mail · GitHub
[go: up one dir, main page]

Skip to content

type check allows nil #162

Open
Open

Description

@Bastrabun

https://github.com/mt-mods/mail/blob/f7cc435f6ba2b7aa82940b112880ad16e7efe0f3/api.lua#L25C1-L25C79

What this means is "Under what circumstances would this expression evaluate to no, that's not a string?:"

	if type(m.to or "") ~= "string" then return false, "'to' is not a string" end

If m.to is nil, then fallback "" is taken. Only if m.to is a table, bool or number this would return "not a string". Even if m.to is not nil but only "", where would it send to?

For my reference 7898

Activity

  1. added this to the 1.4.2 milestone on Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0