Skip to content

Commit 68eb08e

Browse files
authored
fix(🚊): fix issue with metro bundler on Web (#3563)
1 parent d442ae5 commit 68eb08e

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

‎packages/skia/src/sksg/Recorder/Player.ts‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,25 @@ const getZIndex = (command: GroupCommand) => {
6868
return zIndex;
6969
};
7070

71-
const flushPendingGroups = (
72-
ctx: DrawingContext,
73-
pendingGroups: PendingGroup[]
74-
) => {
75-
"worklet";
76-
if (pendingGroups.length === 0) {
77-
return;
78-
}
79-
pendingGroups
80-
.sort((a, b) =>
81-
a.zIndex === b.zIndex ? a.order - b.order : a.zIndex - b.zIndex
82-
)
83-
.forEach(({ command }) => {
84-
play(ctx, command);
85-
});
86-
pendingGroups.length = 0;
87-
};
88-
8971
const play = (ctx: DrawingContext, _command: Command) => {
72+
const flushPendingGroups = (
73+
// eslint-disable-next-line @typescript-eslint/no-shadow
74+
ctx: DrawingContext,
75+
pendingGroups: PendingGroup[]
76+
) => {
77+
"worklet";
78+
if (pendingGroups.length === 0) {
79+
return;
80+
}
81+
pendingGroups
82+
.sort((a, b) =>
83+
a.zIndex === b.zIndex ? a.order - b.order : a.zIndex - b.zIndex
84+
)
85+
.forEach(({ command }) => {
86+
play(ctx, command);
87+
});
88+
pendingGroups.length = 0;
89+
};
9090
// eslint-disable-next-line @typescript-eslint/no-shadow
9191
const playGroup = (ctx: DrawingContext, group: GroupCommand) => {
9292
"worklet";

0 commit comments

Comments
 (0)