Accepting numeric values on common labels

This commit is contained in:
Bruno Alves de Faria committed 2017-10-12 13:25:22 -03:00
1 parent 15f04a5790
commit 6fdfd27fe5
3 files changed
+6 -4

No files matched your search

+3 -1
View File
@@ -35,7 +35,9 @@ OHIF.string.search = (object, query, property=null, result=[]) => {
};
// Encode any string into a safe format for HTML id attribute
OHIF.string.encodeId = string => {
OHIF.string.encodeId = input => {
const string = input && input.toString ? input.toString() : input;
// Return an underscore if the given string is empty or if it's not a string
if (string === '' || typeof string !== 'string') {
return '_';