Skip to content

Commit e47cb3f

Browse files
EdLeckertdaringer
authored andcommitted
Handle empty cell case
1 parent 08e868e commit e47cb3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flex-table-card.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ function getRefs(source, row_data, row_cells) {
476476
return row_data[p1].content;
477477
}
478478
function _replace_cell(match, p1) {
479-
return row_cells[p1].innerText;
479+
return row_cells[p1].innerText == "\n" ? "" : row_cells[p1].innerText; // empty cell contains <br>
480480
}
481481
function _replace_text(value) {
482482
const regex_col = /col\[(\d+)\]/gm;
@@ -694,7 +694,7 @@ class FlexTableCard extends HTMLElement {
694694
}
695695

696696
_setup_cell_for_editing(elem, row, col, index) {
697-
function _handle_lost_focus(e) {
697+
function _handle_lost_focus(e) {
698698
// Check if user changed text.
699699
if (this.textContent != this.dataset.original) {
700700
const actionConfig = {

0 commit comments

Comments
 (0)