Skip to content

Build your personal knowledge base with Trilium Notes

chore(share): fix error in dev mode

Elian Doranc2e0640ea8ca
diff --git a/apps/server/src/share/routes.ts b/apps/server/src/share/routes.ts
index 12d7967f67..16855dd937 100644
--- a/apps/server/src/share/routes.ts
+++ b/apps/server/src/share/routes.ts
@@ -170,7 +170,8 @@ function register(router: Router) {
assetPath: isDev ? assetPath : `../${assetPath}`,
appPath: isDev ? appPath : `../${appPath}`,
showLoginInShareTheme,
- t
+ t,
+ isDev
};
let useDefaultView = true;
diff --git a/packages/share-theme/src/templates/page.ejs b/packages/share-theme/src/templates/page.ejs
index d443def7ee..0bc3c6ac22 100644
--- a/packages/share-theme/src/templates/page.ejs
+++ b/packages/share-theme/src/templates/page.ejs
@@ -10,7 +10,7 @@
<link rel="shortcut icon" href="<% if (note.hasRelation("shareFavicon")) { %>api/notes/<%= note.getRelation("shareFavicon").value %>/download<% } else { %>../favicon.ico<% } %>">
<script src="<%= appPath %>/share.js" type="module"></script>
- <% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %>
+ <% if (!isDev && !note.isLabelTruthy("shareOmitDefaultCss")) { %>
<link href="<%= assetPath %>/stylesheets/share.css" rel="stylesheet">
<% } %>