visuddhinanda 2 лет назад
Родитель
Сommit
8d4e930ae4
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      dashboard/src/components/template/Wbw/WbwMeaning.tsx

+ 4 - 2
dashboard/src/components/template/Wbw/WbwMeaning.tsx

@@ -2,7 +2,6 @@ import { useState } from "react";
 import { useIntl } from "react-intl";
 import { Popover, Typography } from "antd";
 
-import { PaliReal } from "../../../utils";
 import { IWbw, TWbwDisplayMode } from "./WbwWord";
 import WbwMeaningSelect from "./WbwMeaningSelect";
 import { ArticleMode } from "../../article/Article";
@@ -68,7 +67,10 @@ const WbwMeaningWidget = ({
   const handleOpenChange = (newOpen: boolean) => {
     setOpen(newOpen);
   };
-  if (typeof data.real !== "undefined" && PaliReal(data.real.value) !== "") {
+  if (
+    typeof data.real?.value === "string" &&
+    data.real.value.trim().length > 0
+  ) {
     //非标点符号
     return (
       <div style={{ display: "flex", justifyContent: "space-between" }}>