Skip to content

Commit

Permalink
Fixes redirect issue.
Browse files Browse the repository at this point in the history
Fixes redirect issue on v1.0
  • Loading branch information
amostajo committed Aug 11, 2017
1 parent 00a7246 commit 53ef2d3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Dependencies
/bower_components
/node_modules
/node_modules

# Tmp files
package-lock.json
7 changes: 4 additions & 3 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.9
* @version 1.0.10
*/
Vue.component('vform', Vue.extend({
props:
Expand Down Expand Up @@ -224,6 +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.
*
* @param object response Response
*/
Expand All @@ -244,8 +245,8 @@ Vue.component('vform', Vue.extend({
this.$dispatch('vform_invalid', this.response.errors);
this.$broadcast('vform_invalid', this.response.errors);
}
if (response.data.redirect !== undefined)
return window.location = response.data.redirect;
if (response.redirect !== undefined)
return window.location = 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",
"version": "1.0.9",
"version": "1.0.10",
"description": "Form component for Vue JS.",
"main": "dist/vue.social-share.js",
"repository": {
Expand Down
7 changes: 4 additions & 3 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.9
* @version 1.0.10
*/
Vue.component('vform', Vue.extend({
props:
Expand Down Expand Up @@ -224,6 +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.
*
* @param object response Response
*/
Expand All @@ -244,8 +245,8 @@ Vue.component('vform', Vue.extend({
this.$dispatch('vform_invalid', this.response.errors);
this.$broadcast('vform_invalid', this.response.errors);
}
if (response.data.redirect !== undefined)
return window.location = response.data.redirect;
if (response.redirect !== undefined)
return window.location = response.redirect;
this.onComplete();
},
/**
Expand Down

0 comments on commit 53ef2d3

Please sign in to comment.