From 20ddf956de00403884d2a803324072d0e15e0461 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Wed, 2 Oct 2013 21:32:39 -0600 Subject: [PATCH] Fixing random issues I've found while testing. --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 9a37cd8..91e9f62 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ -var mongoose = require('mongoose'); +var mongoose = require('mongoose'), + extend = require('extend'); var counterSchema = new mongoose.Schema({ model: { @@ -29,10 +30,10 @@ module.exports = exports = function (schema, options) { ready = false; switch (typeof(options)) { - case 'String': + case 'string': settings.model = options; break; - case 'Object': + case 'object': extend(settings, options); break; } @@ -79,4 +80,4 @@ module.exports = exports = function (schema, options) { setTimeout(save, 5); })(); }); -}; \ No newline at end of file +};