Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
9f7b6d6f
Commit
9f7b6d6f
authored
Jun 03, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2035
parent
88c7d490
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
src/headless/utils/core.js
src/headless/utils/core.js
+4
-5
No files found.
src/headless/utils/core.js
View file @
9f7b6d6f
...
...
@@ -523,15 +523,14 @@ u.placeCaretAtEnd = function (textarea) {
u
.
getUniqueId
=
function
(
suffix
)
{
const
uuid
=
'
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
'
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
const
r
=
Math
.
random
()
*
16
|
0
,
v
=
c
===
'
x
'
?
r
:
r
&
0x3
|
0x8
;
const
r
=
Math
.
random
()
*
16
|
0
;
const
v
=
c
===
'
x
'
?
r
:
r
&
0x3
|
0x8
;
return
v
.
toString
(
16
);
});
// We prefix the ID with letters so that it's also a valid ID for DOM elements.
if
(
typeof
(
suffix
)
===
"
string
"
||
typeof
(
suffix
)
===
"
number
"
)
{
return
"
id
"
+
uuid
+
"
:
"
+
suffix
;
return
uuid
+
"
:
"
+
suffix
;
}
else
{
return
"
id
"
+
uuid
;
return
uuid
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment