mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-10 14:15:42 +00:00
395a4e80df
Add real-time agent availability status updates to widget. Consolidate multiple WS broadcasts into single calls
11 lines
332 B
JavaScript
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
|
|
}
|
|
}
|
|
}
|