Fix so that it is really possible to pass null to disable transformation in validators.

This commit is contained in:
Mitar
2013-12-05 02:47:10 -08:00
committed by David Glasser
parent b556a474d3
commit 30e709006e

View File

@@ -549,7 +549,7 @@ Meteor.Collection.ObjectID = LocalCollection._ObjectID;
if (!(options[name] instanceof Function)) {
throw new Error(allowOrDeny + ": Value for `" + name + "` must be a function");
}
if (self._transform)
if (self._transform && options.transform !== null)
options[name].transform = self._transform;
if (options.transform)
options[name].transform = Deps._makeNonreactive(options.transform);