Skip to content

un-optional-chaining bug #142

@dzqdzq

Description

@dzqdzq

Describe the bug

Image

Input code

var t,
    n,
    o,
    a =
      null !==
        (t =
          null == r ||
          null === (n = r.app_info) ||
          void 0 === n ||
          null === (o = n.base_info) ||
          void 0 === o
            ? void 0
            : o.app_name) && void 0 !== t
        ? t
        : "game";

Reproduction

No response

Steps to reproduce

Image

Expected behavior

const a = r?.app_info?.base_info?.app_name ?? "game";

Actual behavior

const a = null == r || r.app_info?.base_info?.app_name ?? "game";

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions