Skip to content

Commit

Permalink
Hotfix for response redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
amostajo committed Aug 11, 2017
1 parent ea9e1f4 commit f033089
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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 2.0.1
* @version 2.0.2
*/
Vue.component('vform', Vue.extend({
props:
Expand Down Expand Up @@ -226,7 +226,7 @@ Vue.component('vform', Vue.extend({
* @since 1.0.4 Response errors triggers invalid event.
* @since 1.0.9 Forces response conversion to jsob or blob.
* @since 2.0.0 Use $emit and remove $set.
* @since 2.0.1 Fixes response redirect.
* @since 2.0.2 Fixes response redirect.
*
* @param object response Response
*/
Expand All @@ -242,8 +242,8 @@ Vue.component('vform', Vue.extend({
if (this.response.errors !== undefined && Object.keys(this.response.errors).length > 0) {
this.$emit('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": "2.0.1",
"version": "2.0.2",
"description": "Form component for Vue JS.",
"main": "dist/vue.form.min.js",
"repository": {
Expand Down

0 comments on commit f033089

Please sign in to comment.