不要怂,就是干,撸起袖子干!

Commit b07462e0 by Jan Aagaard Meier

Merge pull request #2694 from sequelize/revert-2691-master

Revert "Workaround to deal with an issue in node-webkit where the valida...
2 parents e742e00b f66631ee
Showing with 2 additions and 6 deletions
......@@ -8,7 +8,7 @@ var validateDeprecation = function(value, expectation, options) {
return;
}
var valid = (value instanceof options.deprecated || typeof(value) === typeof(options.deprecated.call()));
var valid = value instanceof options.deprecated;
if (valid) {
var message = util.format('%s should not be of type "%s"', util.inspect(value), options.deprecated.name);
......@@ -20,10 +20,7 @@ var validateDeprecation = function(value, expectation, options) {
};
var validate = function(value, expectation, options) {
// the second part of this check is a workaround to deal with an issue that occurs in node-webkit when
// using object literals. https://github.com/sequelize/sequelize/issues/2685
if (value instanceof expectation || typeof(value) === typeof(expectation.call())) {
if (value instanceof expectation) {
return true;
}
......@@ -56,4 +53,3 @@ var ParameterValidator = module.exports = {
|| validate(value, expectation, options);
}
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!