Skip to content

Commit 62403b7

Browse files
committed
Fix parens in uuid4
This was causing event_ids to be generated as 33 chars long instead of 32
1 parent 6f7541c commit 62403b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ function uuid4() {
126126
return v;
127127
};
128128

129-
return pad(arr[0]) + pad(arr[1] + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) +
130-
pad(arr[5]) + pad(arr[6]) + pad(arr[7]));
129+
return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) +
130+
pad(arr[5]) + pad(arr[6]) + pad(arr[7]);
131131
} else {
132132
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
133133
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {

0 commit comments

Comments
 (0)