Accepting numeric values on common labels
This commit is contained in:
1 parent
15f04a5790
commit
6fdfd27fe5
3 files changed
+6
-4
No files matched your search
@@ -17,4 +17,4 @@ Template.registerHelper('concat', (...args) => {
|
||||
});
|
||||
|
||||
// Encode any string into a safe format for HTML id attribute
|
||||
Template.registerHelper('encodeId', string => OHIF.string.encodeId(string));
|
||||
Template.registerHelper('encodeId', OHIF.string.encodeId);
|
||||
@@ -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 '_';
|
||||
|
||||
Reference in new issue
Block a user