Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Jun 8, 2019
1 parent 147085f commit 29271c6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dist/index.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ var renderMap = {

var cellValue = _xeUtils["default"].get(row, column.property);

if (isRange) {
return cellValue ? cellValue.map(function (date) {
if (cellValue && isRange) {
cellValue = cellValue.map(function (date) {
return _xeUtils["default"].toDateString(date, format);
}).join(" ".concat(rangeSeparator, " ")) : '';
}).join(" ".concat(rangeSeparator, " "));
}

return _xeUtils["default"].toDateString(cellValue, format);
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@

var cellValue = _xeUtils["default"].get(row, column.property);

if (isRange) {
return cellValue ? cellValue.map(function (date) {
if (cellValue && isRange) {
cellValue = cellValue.map(function (date) {
return _xeUtils["default"].toDateString(date, format);
}).join(" ".concat(rangeSeparator, " ")) : '';
}).join(" ".concat(rangeSeparator, " "));
}

return _xeUtils["default"].toDateString(cellValue, format);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ const renderMap = {
let { row, column } = params
let { isRange, format = 'hh:mm:ss', rangeSeparator = '-' } = props
let cellValue = XEUtils.get(row, column.property)
if (isRange) {
return cellValue ? cellValue.map(date => XEUtils.toDateString(date, format)).join(` ${rangeSeparator} `) : ''
if (cellValue && isRange) {
cellValue = cellValue.map(date => XEUtils.toDateString(date, format)).join(` ${rangeSeparator} `)
}
return XEUtils.toDateString(cellValue, format)
}
Expand Down

0 comments on commit 29271c6

Please sign in to comment.