Comparing version 7.11.1 to 7.11.2
@@ -540,2 +540,13 @@ 'use strict'; | ||
const empty = (results) => { | ||
if (!results || | ||
!Array.isArray(results)) { | ||
return results; | ||
} | ||
return (results.length ? results : null); | ||
}; | ||
// Single item | ||
@@ -546,3 +557,3 @@ | ||
return callback(null, result); | ||
return callback(null, empty(result)); | ||
} | ||
@@ -560,3 +571,3 @@ | ||
cursor.close(); | ||
return callback(null, results && results.length ? results : null); | ||
return callback(null, empty(results)); | ||
}; | ||
@@ -563,0 +574,0 @@ |
{ | ||
"name": "penseur", | ||
"description": "Lightweight RethinkDB wrapper", | ||
"version": "7.11.1", | ||
"version": "7.11.2", | ||
"author": "Eran Hammer <eran@hammer.io> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/hueniverse/penseur", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72991
1664