Skip to content

Commit

Permalink
Merge pull request #1873 from kujirahand/fix_table_change_func
Browse files Browse the repository at this point in the history
テーブルセル変更でVが数値だとエラーになるのを修正 #1872
  • Loading branch information
kujirahand authored Dec 20, 2024
2 parents 03702ec + 4f529a4 commit 981e8e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugin_browser_dom_parts.mts
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,9 @@ export default {
domTR.appendChild(newTD)
td = domTR.childNodes[col + x]
}
td.innerHTML = sys.__tohtml(vRow[x])
if (isNumRight && vRow[x].match(/^(\+|-)?\d+(\.\d+)?$/)) { // number?
const v = String(vRow[x])
td.innerHTML = sys.__tohtml(v)
if (isNumRight && v.match(/^(\+|-)?\d+(\.\d+)?$/)) { // number?
td.style.textAlign = 'right'
}
}
Expand Down

0 comments on commit 981e8e2

Please sign in to comment.