Permalink
Browse files

Trying to fix issue #29

  • Loading branch information...
1 parent cbbd8ea commit c442cb7195acbf705cddb7122256e63b39566881 @GarciaSouza committed Dec 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/helpers/update_document.js
@@ -82,7 +82,7 @@ function _strategy(op, ret, key, value) {
module.exports = function (VALIDATOR) {
var keys = Object.keys(VALIDATOR.update)
- , special_op = keys[0][0] === '$'
+ , special_op = keys[0] && keys[0][0] === '$'
, ret = special_op ? _.clone(VALIDATOR.document) : _.clone(VALIDATOR.update)
, op, key;

0 comments on commit c442cb7

Please sign in to comment.