Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceBaghel258025 committed Nov 11, 2023
1 parent c16e0e9 commit b99bab6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/inputBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ import { motion } from "framer-motion";
import { Loader2 } from "lucide-react";
import { cn } from "@/lib/utils";
function isJSON(str: any) {
let obj : any;
let obj: any;
try {
obj = JSON.parse(str);
} catch (e) {
return false;
}
if (typeof obj === 'number' || obj instanceof Number) {
if (typeof obj === "number" || obj instanceof Number) {
return false;
}
}
return !!obj && typeof obj === "object";
}

interface InputBarProps {
Expand Down

0 comments on commit b99bab6

Please sign in to comment.