Skip to content

Commit

Permalink
Fixes response redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
amostajo committed Aug 11, 2017
1 parent 7eb89ea commit 5b9df49
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions dist/vue.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Alejandro Mostajo <http://about.me/amostajo>
* @copyright 10Quality <http://www.10quality.com>
* @license MIT
* @version 1.0.10
* @version 1.0.11
*/
Vue.component('vform', Vue.extend({
props:
Expand Down Expand Up @@ -224,7 +224,7 @@ Vue.component('vform', Vue.extend({
* @since 1.0.3 Added event broadcast.
* @since 1.0.4 Response errors triggers invalid event.
* @since 1.0.9 Forces response conversion to jsob or blob.
* @since 1.0.10 Fixes redirect issue.
* @since 1.0.11 Fixes redirect issue.
*
* @param object response Response
*/
Expand All @@ -245,8 +245,8 @@ Vue.component('vform', Vue.extend({
this.$dispatch('vform_invalid', this.response.errors);
this.$broadcast('vform_invalid', this.response.errors);
}
if (response.redirect !== undefined)
return window.location = response.redirect;
if (this.response.redirect !== undefined)
return window.location = this.response.redirect;
this.onComplete();
},
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/vue.form.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-form-10q",
"version": "1.0.10",
"version": "1.0.11",
"description": "Form component for Vue JS.",
"main": "dist/vue.social-share.js",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions src/vue.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Alejandro Mostajo <http://about.me/amostajo>
* @copyright 10Quality <http://www.10quality.com>
* @license MIT
* @version 1.0.10
* @version 1.0.11
*/
Vue.component('vform', Vue.extend({
props:
Expand Down Expand Up @@ -224,7 +224,7 @@ Vue.component('vform', Vue.extend({
* @since 1.0.3 Added event broadcast.
* @since 1.0.4 Response errors triggers invalid event.
* @since 1.0.9 Forces response conversion to jsob or blob.
* @since 1.0.10 Fixes redirect issue.
* @since 1.0.11 Fixes redirect issue.
*
* @param object response Response
*/
Expand All @@ -245,8 +245,8 @@ Vue.component('vform', Vue.extend({
this.$dispatch('vform_invalid', this.response.errors);
this.$broadcast('vform_invalid', this.response.errors);
}
if (response.redirect !== undefined)
return window.location = response.redirect;
if (this.response.redirect !== undefined)
return window.location = this.response.redirect;
this.onComplete();
},
/**
Expand Down

0 comments on commit 5b9df49

Please sign in to comment.