Skip to content

Commit 740a500

Browse files
committed
fix: if null in array
1 parent 7767e4f commit 740a500

12 files changed

Lines changed: 93 additions & 4 deletions

dist/fuse.basic.common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ function get(obj, path) {
285285
var arr = false;
286286

287287
var deepGet = function deepGet(obj, path, index) {
288+
if (!isDefined(obj)) {
289+
return;
290+
}
291+
288292
if (!path[index]) {
289293
// If there's no path left, we've arrived at the object we care about.
290294
list.push(obj);

dist/fuse.basic.esm.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ function get(obj, path) {
171171
let arr = false;
172172

173173
const deepGet = (obj, path, index) => {
174+
if (!isDefined(obj)) {
175+
return
176+
}
174177
if (!path[index]) {
175178
// If there's no path left, we've arrived at the object we care about.
176179
list.push(obj);

dist/fuse.basic.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fuse.basic.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@
289289
var arr = false;
290290

291291
var deepGet = function deepGet(obj, path, index) {
292+
if (!isDefined(obj)) {
293+
return;
294+
}
295+
292296
if (!path[index]) {
293297
// If there's no path left, we've arrived at the object we care about.
294298
list.push(obj);

dist/fuse.basic.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fuse.common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ function get(obj, path) {
363363
var arr = false;
364364

365365
var deepGet = function deepGet(obj, path, index) {
366+
if (!isDefined(obj)) {
367+
return;
368+
}
369+
366370
if (!path[index]) {
367371
// If there's no path left, we've arrived at the object we care about.
368372
list.push(obj);

dist/fuse.esm.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ function get(obj, path) {
169169
let arr = false;
170170

171171
const deepGet = (obj, path, index) => {
172+
if (!isDefined(obj)) {
173+
return
174+
}
172175
if (!path[index]) {
173176
// If there's no path left, we've arrived at the object we care about.
174177
list.push(obj);

dist/fuse.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fuse.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@
367367
var arr = false;
368368

369369
var deepGet = function deepGet(obj, path, index) {
370+
if (!isDefined(obj)) {
371+
return;
372+
}
373+
370374
if (!path[index]) {
371375
// If there's no path left, we've arrived at the object we care about.
372376
list.push(obj);

dist/fuse.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)