Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanricky committed Jan 18, 2024
1 parent 2d68983 commit 73bea51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/types/ArraySubdocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ArraySubdocument.prototype.$__fullPath = function(path, skipIndex) {
*/

ArraySubdocument.prototype.$__pathRelativeToParent = function(path, skipIndex) {
if (this.__index == null) {
if (this.__index == null || (!this.__parentArray || !this.__parentArray.$path)) {
return null;
}
if (skipIndex) {
Expand Down

0 comments on commit 73bea51

Please sign in to comment.