mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-14 20:11:52 +00:00
fix clonesafenode in dbNodeChange #5591
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
7c79dbcda1
commit
ad1d82152a
1 changed files with 1 additions and 0 deletions
1
db.js
1
db.js
|
@ -3845,6 +3845,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||||
|
|
||||||
// Called when a node has changed
|
// Called when a node has changed
|
||||||
function dbNodeChange(nodeChange, added) {
|
function dbNodeChange(nodeChange, added) {
|
||||||
|
if (parent.webserver == null) return;
|
||||||
common.unEscapeLinksFieldName(nodeChange.fullDocument);
|
common.unEscapeLinksFieldName(nodeChange.fullDocument);
|
||||||
const node = performTypedRecordDecrypt([nodeChange.fullDocument])[0];
|
const node = performTypedRecordDecrypt([nodeChange.fullDocument])[0];
|
||||||
parent.DispatchEvent(['*', node.meshid], obj, { etype: 'node', action: (added ? 'addnode' : 'changenode'), node: parent.webserver.CloneSafeNode(node), nodeid: node._id, domain: node.domain, nolog: 1 });
|
parent.DispatchEvent(['*', node.meshid], obj, { etype: 'node', action: (added ? 'addnode' : 'changenode'), node: parent.webserver.CloneSafeNode(node), nodeid: node._id, domain: node.domain, nolog: 1 });
|
||||||
|
|
Loading…
Reference in a new issue