myIndex.generate() returns an Array, not a Story?
My first serious time monkeying around with indexing, and I discovered something curious. The API states that idx.generate() returns a story, but in my code, I'm getting an Array of length 1, where array[0] is the story. Is this just an error in the documentation? Is there ever an instance where that array would be longer than 1?
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Index_.html#d1e123003__d1e123278
My snippet:
var tempPage = doc.pages.add();
var s = idx.generate(tempPage, undefined, undefined, false, true);
alert(s.length);
s[0].duplicate(LocationOptions.AT_BEGINNING, tf);
tempPage.remove();
