Ver Fonte

if (typeof inStr !== "string") {

visuddhinanda há 3 anos atrás
pai
commit
c031fdc180
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      dashboard/src/utils.ts

+ 2 - 2
dashboard/src/utils.ts

@@ -63,8 +63,8 @@ export function PaliToEn(pali: string): string {
   return output;
   return output;
 }
 }
 
 
-export function PaliReal(inStr: string): string {
-  if (typeof inStr === "undefined") {
+export function PaliReal(inStr: string | undefined | null): string {
+  if (typeof inStr !== "string") {
     return "";
     return "";
   }
   }
   const paliLetter = "abcdefghijklmnoprstuvyāīūṅñṭḍṇḷṃ";
   const paliLetter = "abcdefghijklmnoprstuvyāīūṅñṭḍṇḷṃ";