mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
core: fix require prismjs on desktop build
This commit is contained in:
@@ -32,7 +32,7 @@ const languagesList = await langen(
|
||||
path.join(ROOT_DIR, "src", "utils", "templates", "html", "languages")
|
||||
);
|
||||
const languageIndex = `function hasRequire() {
|
||||
return typeof require === "function" && !("IS_DESKTOP_APP" in globalThis);
|
||||
return typeof require === "function" && !IS_DESKTOP_APP;
|
||||
}
|
||||
|
||||
export async function loadLanguage(language) {
|
||||
|
||||
@@ -114,5 +114,6 @@ async function preprocessHTML(templateData) {
|
||||
export default { buildHTML };
|
||||
|
||||
function hasRequire() {
|
||||
return typeof require === "function" && !("IS_DESKTOP_APP" in globalThis);
|
||||
// eslint-disable-next-line no-undef
|
||||
return typeof require === "function" && !IS_DESKTOP_APP;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user