Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix(desktop): welcome note not loading properly

thecodrr66e15a7dceb2
diff --git a/apps/web/desktop/protocol.js b/apps/web/desktop/protocol.js
index baa4e509f..a45a0a0c6 100644
--- a/apps/web/desktop/protocol.js
+++ b/apps/web/desktop/protocol.js
@@ -23,7 +23,7 @@ function registerProtocol() {
PROTOCOL,
async (request, callback) => {
const url = new URL(request.url);
- if (url.hostname === HOSTNAME) {
+ if (shouldInterceptRequest(url)) {
logger.info("Intercepting request:", request);
const loadIndex = !path.extname(url.pathname);
@@ -81,4 +81,10 @@ function registerProtocol() {
);
}
+const bypassedRoutes = ["/notes/index_v14.json", "/notes/welcome-web"];
+function shouldInterceptRequest(url) {
+ let shouldIntercept = url.hostname === HOSTNAME;
+ return shouldIntercept && !bypassedRoutes.includes(url.pathname);
+}
+
module.exports = { registerProtocol, URL: `${PROTOCOL}://${HOSTNAME}/` };