OneMore icon indicating copy to clipboard operation
OneMore copied to clipboard

Error executing InsertTocCommand

Open gpbicego opened this issue 3 years ago • 0 comments

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:

  1. Make a new OneNote page
  2. Add "Heading 2" before "Heading 1"
  3. OneMore: "Insert table of headings on this page"
  4. See error

Expected behavior image

Screenshots image

Environment (if applicable):

  • OneNote Version: O365 64bit OneNote Version 2206 (Build 15330.20264)
  • OneMore Version 4.18

Additional context page.zip

gpbicego avatar Aug 04 '22 08:08 gpbicego