Browse Source

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

visuddhinanda 3 years ago
parent
commit
c031fdc180
1 changed files with 2 additions and 2 deletions
  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āīūṅñṭḍṇḷṃ";