Error executing InsertTocCommand
Describe the bug
14456:6] Running command InsertTocCommand
14456:6] ..error executing InsertTocCommand
14456:6] ..System.InvalidOperationException
Message: Sequence contains no elements
Source: System.Core
StackTrace: at System.Linq.Enumerable.Last[TSource](IEnumerable1 source) at River.OneMoreAddIn.Commands.InsertTocCommand.BuildHeadings(XElement container, List1 headings, Int32& index, Int32 level, Boolean dark)
at River.OneMoreAddIn.Commands.InsertTocCommand.<InsertToc>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at River.OneMoreAddIn.Commands.InsertTocCommand.<Execute>d__8.MoveNext()
TargetSite: [System.Core] System.Linq.Enumerable::Last()
To Reproduce Steps to reproduce the behavior:
- Make a new OneNote page
- Add "Heading 2" before "Heading 1"
- OneMore: "Insert table of headings on this page"
- See error
Expected behavior

Screenshots

Environment (if applicable):
- OneNote Version: O365 64bit OneNote Version 2206 (Build 15330.20264)
- OneMore Version 4.18
Additional context page.zip