only register handler for prod builds

This commit is contained in:
hzrd149
2023-06-11 10:30:23 -05:00
parent 3af800f772
commit 0836872f51

View File

@@ -4,11 +4,13 @@ import { App } from "./app";
import { Providers } from "./providers";
// register nostr: protocol handler
try {
navigator.registerProtocolHandler("web+nostr", new URL("/l/%s", location.origin).toString());
} catch (e) {
console.log("Failed to register handler");
console.log(e);
if (import.meta.env.PROD) {
try {
navigator.registerProtocolHandler("web+nostr", new URL("/l/%s", location.origin).toString());
} catch (e) {
console.log("Failed to register handler");
console.log(e);
}
}
const element = document.getElementById("root");