We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4455ac8 commit fffd7c3Copy full SHA for fffd7c3
src/pages/_app.tsx
@@ -25,7 +25,8 @@ const App: FunctionComponent<AppProps> = ({ Component, pageProps }) => {
25
if (window.navigator.share) {
26
const title = document.title;
27
const url = window.location.href;
28
- const text = document.querySelector("meta[property='description']").getAttribute('content');
+ const descriptionEl = document.querySelector("meta[name='description']");
29
+ const text = descriptionEl ? descriptionEl.getAttribute('content') : '';
30
return window.navigator.share({ title, text: `${text} ${url}` });
31
}
32
// fallback to custom native share dialog
0 commit comments