periodicjs.core.data
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -67,3 +67,3 @@ 'use strict'; | ||
function getPlainResult(result) { | ||
return (typeof result.get === 'function') ? | ||
return (result && typeof result.get === 'function') ? | ||
result.get({ plain: true }) : | ||
@@ -160,4 +160,3 @@ result; | ||
documents: (this.jsonify_results) ? | ||
getJSONResults(data) : | ||
data, | ||
getJSONResults(data) : data, | ||
count: data.length, | ||
@@ -560,3 +559,3 @@ }; | ||
this.docid = options.docid || 'id'; | ||
this.jsonify_results = (typeof options.jsonify_results) ? options.jsonify_results : true; | ||
this.jsonify_results = (typeof options.jsonify_results === 'boolean') ? options.jsonify_results : true; | ||
if (options.model && typeof options.model === 'object') { | ||
@@ -563,0 +562,0 @@ if (Array.isArray(options.model)) this.model = this.db_connection.define(...options.model); |
@@ -97,4 +97,4 @@ { | ||
}, | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"license": "MIT" | ||
} |
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
1849179
5091