Skip to content

Commit

Permalink
Fix setup crash when not specifying locale.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Reyes committed Feb 28, 2018
1 parent 11fa0fd commit 4f75136
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.7.1
## Bug Fixes
* Fix setup crash when not manually specifying a locale

# v0.7.0
## Bug Fixes
`v-calendar`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Vue.use(VueClipboard);
Vue.use(Buefy, {
defaultIconPack: 'fa',
});
Vue.use(VCalendar, { locale: 'us', firstDayOfWeek: 1 });
Vue.use(VCalendar);
Vue.component('CodeBlock', CodeBlock);
Vue.directive('highlight', {
deep: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "v-calendar",
"version": "0.7.0",
"version": "0.7.1",
"description": "A clean and extendable plugin for building simple attributed calendars in Vue.js.",
"keywords": [
"vue",
Expand Down
3 changes: 1 addition & 2 deletions src/utils/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ export const resolveDefault = (def, args) => (isObject(def) && def) || (isFuncti

export const mergeDefaults = (otherDefaults) => {
// Setup locale defaults if needed
const newLocale = otherDefaults && otherDefaults.locale;
if (newLocale && newLocale !== defaults.locale) setupLocale(newLocale, defaults);
setupLocale(otherDefaults && otherDefaults.locale, defaults);
// Assign the defaults
return Object.assign(defaults, otherDefaults);
};

0 comments on commit 4f75136

Please sign in to comment.