Files
libredesk/frontend/shared-ui/utils/object.js
T
Abhinav Raut 395a4e80df Refactor ws updates to use direct json payloads instead of prop value pattern.
Add real-time agent availability status updates to widget.

Consolidate multiple WS broadcasts into single calls
2026-03-22 19:34:21 +05:30

11 lines
332 B
JavaScript

export function deepMerge (target, source) {
for (const key of Object.keys(source)) {
const val = source[key]
if (val !== null && typeof val === 'object' && !Array.isArray(val) && typeof target[key] === 'object' && target[key] !== null) {
deepMerge(target[key], val)
} else {
target[key] = val
}
}
}