Skip to content

Commit c33ff38

Browse files
committed
check if node exists
1 parent 4f66873 commit c33ff38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mcapi/fle/field-level-encryption.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function decrypt(response) {
134134
*/
135135
function encryptBody(path, body) {
136136
let elem = elemFromPath(path.element, body);
137-
if (elem){
137+
if (elem && elem.node){
138138
let encryptedData = this.crypto.encryptData({data: elem.node});
139139
utils.mutateObjectProperty(path.obj,
140140
encryptedData,

0 commit comments

Comments
 (0)