Skip to content

Commit 53890b2

Browse files
committed
minor
1 parent bdf71b0 commit 53890b2

File tree

1 file changed

+9
-6
lines changed
  • services/static-webserver/client/source/class/osparc/utils

1 file changed

+9
-6
lines changed

services/static-webserver/client/source/class/osparc/utils/Utils.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,12 +1010,15 @@ qx.Class.define("osparc.utils.Utils", {
10101010
isUrl: url => /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/gm.test(url),
10111011

10121012
snakeToCamel: str => {
1013-
return str.toLowerCase().replace(/([-_][a-z])/g, group =>
1014-
group
1015-
.toUpperCase()
1016-
.replace("-", "")
1017-
.replace("_", "")
1018-
);
1013+
if (str.includes("_")) {
1014+
return str.toLowerCase().replace(/([-_][a-z])/g, group =>
1015+
group
1016+
.toUpperCase()
1017+
.replace("-", "")
1018+
.replace("_", "")
1019+
);
1020+
}
1021+
return str;
10191022
},
10201023

10211024
setIdToWidget: (qWidget, id) => {

0 commit comments

Comments
 (0)