Skip to content

The open alternative to Salesforce, designed for AI.

356 B
Raw Blame
export const restoreUnchangedComputedStyle = <
  TSnapshot extends { computedStyle?: Record<string, string> },
>({
  previousSnapshot,
  nextSnapshot,
}: {
  previousSnapshot: TSnapshot | null | undefined;
  nextSnapshot: TSnapshot;
}): TSnapshot => ({
  ...nextSnapshot,
  computedStyle: nextSnapshot.computedStyle ?? previousSnapshot?.computedStyle,
});