mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 18:33:53 +00:00
handle timer type whitespace (#1225)
This commit is contained in:
committed by
GitHub
parent
8a5cef79a8
commit
78e2f217a4
@@ -8,9 +8,9 @@ import { deepmerge } from 'ontime-utils';
|
||||
* @returns {string} - value as string or fallback if not possible
|
||||
*/
|
||||
export const makeString = (val: unknown, fallback = ''): string => {
|
||||
if (typeof val === 'string') return val;
|
||||
if (typeof val === 'string') return val.trim();
|
||||
else if (val == null || val.constructor === Object) return fallback;
|
||||
return val.toString();
|
||||
return val.toString().trim();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user