mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 18:52:50 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
14
node_modules/mongoose/lib/schema/mixed.js
generated
vendored
14
node_modules/mongoose/lib/schema/mixed.js
generated
vendored
@@ -15,7 +15,7 @@ var utils = require('../utils');
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function Mixed (path, options) {
|
||||
function Mixed(path, options) {
|
||||
if (options && options.default) {
|
||||
var def = options.default;
|
||||
if (Array.isArray(def) && 0 === def.length) {
|
||||
@@ -25,9 +25,9 @@ function Mixed (path, options) {
|
||||
utils.isObject(def) &&
|
||||
0 === Object.keys(def).length) {
|
||||
// prevent odd "shared" objects between documents
|
||||
options.default = function () {
|
||||
return {}
|
||||
}
|
||||
options.default = function() {
|
||||
return {};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ Mixed.prototype.constructor = Mixed;
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Mixed.prototype.checkRequired = function (val) {
|
||||
Mixed.prototype.checkRequired = function(val) {
|
||||
return (val !== undefined) && (val !== null);
|
||||
};
|
||||
|
||||
@@ -67,7 +67,7 @@ Mixed.prototype.checkRequired = function (val) {
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Mixed.prototype.cast = function (val) {
|
||||
Mixed.prototype.cast = function(val) {
|
||||
return val;
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ Mixed.prototype.cast = function (val) {
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Mixed.prototype.castForQuery = function ($cond, val) {
|
||||
Mixed.prototype.castForQuery = function($cond, val) {
|
||||
if (arguments.length === 2) return val;
|
||||
return $cond;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user