refactor view date

pull/1792/head
Cagatay Civici 2021-11-17 17:30:29 +03:00
parent f5f07c88f6
commit c6aaffe77a
1 changed files with 1 additions and 5 deletions

View File

@ -2186,15 +2186,11 @@ export default {
computed: { computed: {
viewDate() { viewDate() {
let propValue = this.modelValue; let propValue = this.modelValue;
if (typeof propValue === 'string') {
return new Date();
}
if (propValue && Array.isArray(propValue)) { if (propValue && Array.isArray(propValue)) {
propValue = propValue[0]; propValue = propValue[0];
} }
if (propValue) { if (propValue && typeof propValue !== 'string') {
return propValue; return propValue;
} }
else { else {