mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix(desktop): welcome note not loading properly
This commit is contained in:
@@ -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}/` };
|
||||
|
||||
Reference in New Issue
Block a user