Skip to content

Commit ebcdb1e

Browse files
authored
Merge pull request feathersjs-ecosystem#428 from bertho-zero/patch-3
Update alter-items.js
2 parents 2d99bf4 + baab981 commit ebcdb1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/services/alter-items.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ module.exports = function (func) {
1717

1818
const results = (isArray ? items : [items]).map(item => func(item, context));
1919

20-
const hasPromises = results.some(result => typeof result === 'object' && typeof result.then === 'function');
20+
const hasPromises = results.some(result =>
21+
typeof result === 'object' && result !== null && typeof result.then === 'function'
22+
);
2123

2224
const setItem = (value, index) => {
2325
if (typeof value === 'object' && value !== null) {

0 commit comments

Comments
 (0)