[PR #56] [MERGED] fix: convert MapIterator to array for frameRequests.forEach #1040

Closed
opened 2026-03-14 09:15:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/56
Author: @hanbao-dev
Created: 8/23/2025
Status: Merged
Merged: 8/23/2025
Merged by: @kommander

Base: mainHead: main


📝 Commits (1)

  • eb161fa fix: convert MapIterator to array for frameRequests.forEach

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/core/src/renderer.ts (+1 -1)

📄 Description

The animationRequest.values() method returns a MapIterator which doesn't have a forEach method, causing "frameRequests.forEach is not a function" runtime error when requestAnimationFrame callbacks are processed. Wrap with Array.from() to convert the iterator to an array before calling forEach in the render loop. Fixes animation frame callback processing in Node.js environments.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/56 **Author:** [@hanbao-dev](https://github.com/hanbao-dev) **Created:** 8/23/2025 **Status:** ✅ Merged **Merged:** 8/23/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`eb161fa`](https://github.com/anomalyco/opentui/commit/eb161fad3f4865c6ce350dec2224b2760372b789) fix: convert MapIterator to array for frameRequests.forEach ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderer.ts` (+1 -1) </details> ### 📄 Description The animationRequest.values() method returns a MapIterator which doesn't have a forEach method, causing "frameRequests.forEach is not a function" runtime error when requestAnimationFrame callbacks are processed. Wrap with Array.from() to convert the iterator to an array before calling forEach in the render loop. Fixes animation frame callback processing in Node.js environments. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:15:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1040
No description provided.