Setting PageNode.flowStartingPoints to Empty Array

Within the UI you can remove all flow starting points manually. The resulting behavior in prototype view is that the primary navigation includes all top level frames in their inherent order instead of being subset to only the ones involved in the flow via interactions. This is conveniently the behavior that I want. However, if you try to remove all flow starting points in a plugin using this API:

figma.currentPage.flowStartingPoints = []

It instead picks a default flow. I couldn’t find a way to circumvent this and get to the same state via the plugin API as I could from the UI so wanted to see if there was a known way to actually have an empty array assigned here or achieve the same end result that I’m missing.

Your code works for me and removes all starting points. Can you share a test file if you think it’s a bug?

I ran it in the console and it also works correctly for me there. The plugin runs it at the end but there are some async text updates that happen afterward. Will have to see if maybe that is triggering the reset. At least the base function acts like I expected. Thanks for checking.

I reworked things to make clearing flowStartingPoints the absolute last action before calling closePlugin() as the primary issue was that even changes that aren’t related to interactions can trigger an automatic generation of flowStartingPoints.

There are still some documents I’m testing that end up with a default flow start even after this change, but in those same documents running figma.currentPage.flowStartingPoints = [] in the console successfully clears them. I unfortunately don’t have much more time to tinker with this one but if I can ever isolate what is different about those documents I’ll open a separate issue.