Skip to content

Commit

Permalink
fix uuid when test
Browse files Browse the repository at this point in the history
  • Loading branch information
hedrall committed Feb 24, 2022
1 parent 65f1f8c commit c9eec35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export function getMotionName(prefixCls: string, transitionName?: string, animat

// ================================ UUID ================================
let uuid = -1;
const isTest = process.env.NODE_ENV === 'test';
export function getUUID() {
if (isTest) return 0;
uuid += 1;
return uuid;
}
Expand Down

0 comments on commit c9eec35

Please sign in to comment.