Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
Reference equality fix. (#367)
Rahul Ravikumard1f3e96dd590
diff --git a/slides/src/code.ts b/slides/src/code.tsindex b064d2eb..783adf31 100644--- a/slides/src/code.ts+++ b/slides/src/code.ts@@ -78,7 +78,7 @@ export function renderCodeInto(pre: HTMLElement, el: CodeElement, doc: BentoDoc)// first slide's tokens — same text, zero travel. The element handed to the// renderer is the model object itself, so identity is exact. (The original// implementation got this right; a rewrite briefly did not.)- const slideIdx = doc.slides.findIndex((s) => (s.elements as unknown[]).includes(el))+ const slideIdx = doc.slides.findIndex((s) => s.elements.some((e) => e === el))if (slideIdx < 0) return falseconst states = diffFor(doc, morphKey)const slideStates = states.get(slideIdx)