summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-03-23 19:41:08 -0700
committerGitHub <noreply@github.com>2017-03-23 19:41:08 -0700
commit98baf1536eb1b47d8258e188e1c80393182c6525 (patch)
tree2c60ec6c40fb6e328de980be97e67b76d06db5cb /webapp/utils
parent6935e2d5ea73d34f0f383715fd161059eff74608 (diff)
downloadchat-98baf1536eb1b47d8258e188e1c80393182c6525.tar.gz
chat-98baf1536eb1b47d8258e188e1c80393182c6525.tar.bz2
chat-98baf1536eb1b47d8258e188e1c80393182c6525.zip
Fixing issue with ids for selenium (#5859)
* Fixing issue with ids for selenium * removing comment
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/utils.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index b3370e88c..820f1a1c7 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -31,6 +31,14 @@ export function isMac() {
return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
}
+export function createSafeId(str) {
+ if (str === null) {
+ return null;
+ }
+
+ return str.replace(' ', '_');
+}
+
export function cmdOrCtrlPressed(e) {
return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey && !e.altKey);
}