Skip to content

Full Toolkit for Next-Level Domain Analysis

Fix minor bugs 🐞

Felix Wotschofsky575f5d248821
diff --git a/app/lookup/[domain]/_components/share-button.tsx b/app/lookup/[domain]/_components/share-button.tsx
index d6d73fe..93797d6 100644
--- a/app/lookup/[domain]/_components/share-button.tsx
+++ b/app/lookup/[domain]/_components/share-button.tsx
@@ -12,20 +12,19 @@ export const ShareButton: FC = () => {
const { reportEvent } = useAnalytics();
const onClick = useCallback(() => {
+ reportEvent('Share: Click', {
+ url: window.location.pathname + window.location.search,
+ });
+
if ('share' in navigator) {
navigator.share({
title: document.title,
url: window.location.href,
});
- return;
} else {
(navigator as Navigator).clipboard.writeText(window.location.href);
toast('Copied to clipboard');
}
-
- reportEvent('Share: Click', {
- url: window.location.pathname + window.location.search,
- });
}, [reportEvent]);
return (
diff --git a/components/sortable-table.tsx b/components/sortable-table.tsx
index ff4cf44..e4913ee 100644
--- a/components/sortable-table.tsx
+++ b/components/sortable-table.tsx
@@ -45,7 +45,7 @@ export const SortableTable = <T extends Record<string, any>>({
const sortedData = useMemo(
() =>
- data.sort((a, b) => {
+ data.toSorted((a, b) => {
if (a[sort] > b[sort]) return sortDirection === 'asc' ? 1 : -1;
if (a[sort] < b[sort]) return sortDirection === 'asc' ? -1 : 1;
return 0;
diff --git a/lib/resolvers/authoritative.ts b/lib/resolvers/authoritative.ts
index ecec894..b8df870 100644
--- a/lib/resolvers/authoritative.ts
+++ b/lib/resolvers/authoritative.ts
@@ -117,7 +117,10 @@ export class AuthoritativeResolver extends DnsResolver {
clearTimeout(timeout);
resolve(response);
});
- socket.on('error', reject);
+ socket.on('error', (error) => {
+ socket.close();
+ reject(error);
+ });
});
}