koishijs / koishi-plugin-puppeteer

Browser service | 浏览器服务

Home Page:https://puppeteer.koishi.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: TypeError: Cannot read properties of undefined (reading 'replace')

Kabuda-czh opened this issue · comments

commented

在使用 jsxsvg 内部的 text 标签会报错

<svg viewBox="0 0 100 100">
  <circle
    cx="50"
    cy="50"
    r="50"
    fill="none"
    stroke="#ccc"
    strokeWidth="10"
  />
  <circle
    cx="50"
    cy="50"
    r="50"
    fill="none"
    stroke="#f00"
    strokeWidth="10"
    strokeDasharray={2 * Math.PI * 50}
    strokeDashoffset={2 * Math.PI * 50 * (1 - 0.8)}
    transform="rotate(-90, 50, 50)"
  />
  <text
    x="50"
    y="50"
    textAnchor="middle"
    dominantBaseline="middle"
    fontSize="20"
    fill="#000"
  >
    {`${Math.floor(0.8 * 100)}%`}
  </text>
</svg>