Function: rowToMonitorOrUndefined()
rowToMonitorOrUndefined(
row:MonitorRow|undefined):Monitor|undefined
Defined in: electron/services/database/utils/monitorMapper.ts:396
Converts a database row to a monitor object, or returns undefined if the
row is missing.
Parameters
row
The raw database row or undefined.
MonitorRow | undefined
Returns
Monitor | undefined
The mapped monitor object, or undefined if the row is missing.
Remarks
- Returns
undefinedif the input row isundefinedornull. - Otherwise, delegates to rowToMonitor.
- Used by repository methods where a missing monitor is not an error.
Example
const monitor = rowToMonitorOrUndefined(dbRowOrUndefined);
Throws
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error if mapping fails for a valid row.