Function: getDefaultMonitorId()
getDefaultMonitorId(
monitorIds
: readonlystring
[]):string
Defined in: src/utils/monitorUiHelpers.ts:153
Get the default monitor ID from a list of monitor IDs.
Parametersโ
monitorIdsโ
readonly string
[]
Array of monitor IDs
Returnsโ
string
Default monitor ID (first valid ID in array) or empty string if array is empty or contains no valid IDs
Remarksโ
This function returns the first element of the array if it exists, otherwise an empty string. It does not validate whether the IDs are actually valid monitor identifiers - that should be done by the caller if needed. Empty arrays return an empty string as a safe fallback.