diff --git a/constrainable.js b/constrainable.js index c8b1ab0..0edfd41 100644 --- a/constrainable.js +++ b/constrainable.js @@ -9,8 +9,8 @@ function isRegExp(val) { var Constrainable = { statics: { willTransitionTo : function(transition, params) { - if (!this.validatePath || !this.validateParams) return; - if (!this.validatePath(transition.path) || !this.validateParams(params)) { + if (!this.handler.validatePath || !this.handler.validateParams) return; + if (!this.handler.validatePath(transition.path) || !this.handler.validateParams(params)) { transition.redirect(this.redirectTo); } },