Sfoglia il codice sorgente

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

visuddhinanda 3 anni fa
parent
commit
c031fdc180
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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;
 }
 
-export function PaliReal(inStr: string): string {
-  if (typeof inStr === "undefined") {
+export function PaliReal(inStr: string | undefined | null): string {
+  if (typeof inStr !== "string") {
     return "";
   }
   const paliLetter = "abcdefghijklmnoprstuvyāīūṅñṭḍṇḷṃ";