Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Trying to fix issue #29

  • Loading branch information...
commit c442cb7195acbf705cddb7122256e63b39566881 1 parent cbbd8ea
@GarciaSouza authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/helpers/update_document.js
View
2  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;
Please sign in to comment.
Something went wrong with that request. Please try again.