Skip to content

Commit

Permalink
Add workaround for exporting wp.i18n to worker
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Sep 29, 2024
1 parent b292a14 commit 8847b49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export const isValidMemberName = (memberName: string) =>
startsWith(memberName, 'toJSON') ||
startsWith(memberName, 'constructor') ||
startsWith(memberName, 'toString') ||
startsWith(memberName, '_')
(
startsWith(memberName, '_') &&
!['__', '_n', '_x', '_nx'].includes(memberName) // Workaround for exporting wp.i18n to worker.
)
);

export const getLastMemberName = (applyPath: ApplyPath, i?: number) => {
Expand Down

0 comments on commit 8847b49

Please sign in to comment.