Skip to content

Commit

Permalink
fix: skip localeChanged listener in SSR closes logaretm#1382
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Jun 11, 2018
1 parent fe84f50 commit 27b3a5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export default class Validator {
this.errors.regenerate();
};

if (this._vm) {
// skip listening in SSR
if (this._vm && typeof window !== 'undefined') {
this._vm.$on('localeChanged', this._localeListener);
}
}
Expand Down

0 comments on commit 27b3a5f

Please sign in to comment.