Fix bugs for plugins and themes
This commit is contained in:
parent
826aa7999c
commit
66d8d7a069
|
@ -12,6 +12,7 @@ Object.defineProperty(window, "webpackJsonp", {
|
|||
electron.webFrame.top.context.global = electron.webFrame.top.context;
|
||||
electron.webFrame.top.context.require = require;
|
||||
electron.webFrame.top.context.process = process;
|
||||
electron.webFrame.top.context.Buffer = Buffer;
|
||||
|
||||
// Load Discord's original preload
|
||||
const preload = process.env.DISCORD_PRELOAD;
|
||||
|
|
|
@ -55,6 +55,7 @@ export default new class ThemeManager extends AddonManager {
|
|||
/* Overrides */
|
||||
getFileModification(module, fileContent, meta) {
|
||||
meta.css = fileContent;
|
||||
if (meta.format == "json") meta.css = meta.css.split("\n").slice(1).join("\n");
|
||||
return `module.exports = ${JSON.stringify(meta)};`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue