Skip to content

Commit 73bea51

Browse files
committedJan 18, 2024
null check
1 parent 2d68983 commit 73bea51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/types/ArraySubdocument.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ ArraySubdocument.prototype.$__fullPath = function(path, skipIndex) {
137137
*/
138138

139139
ArraySubdocument.prototype.$__pathRelativeToParent = function(path, skipIndex) {
140-
if (this.__index == null) {
140+
if (this.__index == null || (!this.__parentArray || !this.__parentArray.$path)) {
141141
return null;
142142
}
143143
if (skipIndex) {

0 commit comments

Comments
 (0)
Please sign in to comment.