Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cool-peas-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lynx-js/react": patch
---

Fix "TypeError: not a function" error caused by `replaceAll` not supported in ES5.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function snapshotPatchApply(snapshotPatch: SnapshotPatch): void {
// HMR-related
// Update the evaluated snapshot entryName from JS.
snapshotCreatorMap[uniqID] = evaluate<(uniqId: string) => string>(
snapshotCreatorMap[uniqID]!.toString().replaceAll('globDynamicComponentEntry', JSON.stringify(entryName)),
snapshotCreatorMap[uniqID]!.toString().replace(/globDynamicComponentEntry/g, JSON.stringify(entryName)),
);
}
break;
Expand Down
Loading