Outline: expand/collapse icon remains after removing a nested heading

In the Outline view, the expand/collapse icon (chevron) next to a heading doesn’t go away after its nested heading is removed. For example, if I add a lower-level heading under a heading (which makes the icon appear) and then delete that lower-level heading, the icon still shows up, even though the heading no longer has any sub-headings.

Steps to reproduce

  1. Open a Sandbox vault.
  2. Open the Outline view (right sidebar).
  3. Create a heading, e.g. ## Heading.
  4. Add a lower-level heading under it, e.g. ### Subheading. An expand/collapse icon appears next to ## Heading.
  5. Delete the ### Subheading.
  6. Look at ## Heading in the Outline.

Did you read and follow the Troubleshooting Guide ? [Yes/No]

Yes

Expected result

The expand/collapse icon next to ## Heading should disappear, since it no longer has any sub-headings.

Actual result

The expand/collapse icon still shows up next to ## Heading, even though there are no sub-headings under it.

Environment

SYSTEM INFO:
	Obsidian version: 1.14.4
	Installer version: 1.14.4
	Operating system: Windows 11
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Thanks! fixed for the next release