# languages: Fix nested object methods missing from outline panel \(\#50754\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f2cead49b1c769d653e2cd145efdd807ae4d1692)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f2cead49b1c769d653e2cd145efdd807ae4d1692

Requested commit: f2cead49b1c769d653e2cd145efdd807ae4d1692

Commit: f2cead49b1c769d653e2cd145efdd807ae4d1692

Tree: f2e2f6b8dae5df02b1d7fe4cf1d2d93aeee22ebf

Author: Emamul Andalib

Committer: GitHub

## Message

```
languages: Fix nested object methods missing from outline panel (#50754)

Shorthand methods (`methodName() {}`) inside nested object literals were
not shown in the Outline panel. The outline query only captured
method_definition when it was a direct child of a variable_declarator's
object, so nested objects (e.g. `deep: { subFn() {} }`) were missed.

Extended the outline query to match method_definition in any object
node, not just top-level variable_declarator objects. Applied the fix to
TypeScript, JavaScript, and TSX outline definitions. Added tests for the
issue reproduction and edge cases.

Supporting evidence:
<img width="1352" height="812" alt="image"
src="https://github.com/user-attachments/assets/64868a70-abd3-4935-9c03-4c809b55262b"
/>

Fixes #48711

Release Notes:

- Fixed nested object methods not appearing in the Outline panel for
JavaScript and TypeScript files
```

## Parents

- [b8bec905def6c90b67579b508de40a51252630ae](https://git.cafe/gitcafe/zed/commit/b8bec905def6c90b67579b508de40a51252630ae?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f2cead49b1c769d653e2cd145efdd807ae4d1692?format=markdown)
