Skip to content

Commit

Permalink
Changed default types of props to undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ManukMinasyan committed Dec 18, 2019
1 parent f85fe7b commit ec165f4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"name": "vue-functional-calendar",
"description": "Lightweight, high-performance calendar component based on Vue.js",
"version": "2.7.0",
"version": "2.7.1",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
9 changes: 5 additions & 4 deletions src/components/FunctionalCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,13 @@
},
setConfigs() {
let vm = this;
let globalOptions;
if (typeof vm.$getOptions !== "undefined") {
// Global Options
Object.keys(vm.$getOptions()).map(function (objectKey) {
globalOptions = vm.$getOptions();
Object.keys(globalOptions).map(function (objectKey) {
if (typeof (vm.fConfigs[objectKey]) !== "undefined") {
vm.$set(vm.fConfigs, objectKey, vm.$getOptions()[objectKey]);
vm.$set(vm.fConfigs, objectKey, globalOptions[objectKey]);
}
});
}
Expand All @@ -377,8 +379,7 @@
} else {
Object.keys(vm.$props).map(function (objectKey) {
if (typeof (vm.fConfigs[objectKey]) !== "undefined" &&
typeof (vm.$props[objectKey]) !== "undefined" &&
typeof (vm.$getOptions()[objectKey]) === "undefined") {
typeof (vm.$props[objectKey]) !== "undefined") {
vm.$set(vm.fConfigs, objectKey, vm.$props[objectKey]);
}
});
Expand Down
40 changes: 20 additions & 20 deletions src/mixins/propsAndData.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,65 @@ export const propsAndData = {
},
sundayStart: {
type: Boolean,
default: () => false
default: () => undefined
},
placeholder: {
type: [String, Boolean],
default: () => false
default: () => undefined
},
dateFormat: {
type: String
},
isMultiple: {
type: Boolean,
default: () => false
default: () => undefined
},
isSeparately: {
type: Boolean,
default: () => false
default: () => undefined
},
isDatePicker: {
type: Boolean,
default: () => false
default: () => undefined
},
isMultipleDatePicker: {
type: Boolean,
default: () => false
default: () => undefined
},
isDateRange: {
type: Boolean,
default: () => false
default: () => undefined
},
withTimePicker: {
type: Boolean,
default: () => false
default: () => undefined
},
calendarsCount: {
type: Number
},
isModal: {
type: Boolean,
default: () => false
default: () => undefined
},
isTypeable: {
type: Boolean,
default: () => false
default: () => undefined
},
changeMonthFunction: {
type: Boolean,
default: () => false
default: () => undefined
},
changeYearFunction: {
type: Boolean,
default: () => false
default: () => undefined
},
changeYearStep: {
type: Number,
default: () => 12
},
applyStylesheet: {
type: Boolean,
default: () => true
default: () => undefined
},
newCurrentDate: {
type: Date
Expand All @@ -85,15 +85,15 @@ export const propsAndData = {
},
limits: {
type: [Object, Boolean],
default: () => false
default: () => undefined
},
minSelDays: {
type: [Number, Boolean],
default: () => false
default: () => undefined
},
maxSelDays: {
type: [Number, Boolean],
default: () => false
default: () => undefined
},
dayNames: {
type: Array,
Expand All @@ -106,25 +106,25 @@ export const propsAndData = {
},
showWeekNumbers: {
type: Boolean,
default: () => false
default: () => undefined
},
value: {
type: Object
},
transition: {
type: Boolean,
default: () => true
default: () => undefined
},
hiddenElements: {
type: Array
},
isAutoCloseable: {
type: Boolean,
default: false,
default: undefined,
},
isDark: {
type: Boolean,
default: false
default: undefined
}
},
data() {
Expand Down

1 comment on commit ec165f4

@vercel
Copy link

@vercel vercel bot commented on ec165f4 Dec 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.