Selaa lähdekoodia

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

visuddhinanda 2 vuotta sitten
vanhempi
sitoutus
c031fdc180
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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āīūṅñṭḍṇḷṃ";