Skip to content

Commit 3a0f98c

Browse files
prettier
1 parent 5a6763b commit 3a0f98c

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

scripts/build.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ if (silent) console.error = console.log = function () {};
3030
if (argv.includes("clean")) {
3131
console.log(`[${++i}/${steps}] Cleaning...`);
3232
let d = "../" + "/dist";
33-
if (fs.existsSync(d)) {
34-
fs.rmSync(d, { recursive: true });
35-
if (verbose) console.log(`Deleted ${d}!`);
36-
}
33+
if (fs.existsSync(d)) {
34+
fs.rmSync(d, { recursive: true });
35+
if (verbose) console.log(`Deleted ${d}!`);
36+
}
3737
}
3838

3939
console.log(`[${++i}/${steps}] Compiling src files ...`);
@@ -110,7 +110,7 @@ if (!argv.includes("copyonly")) {
110110
}
111111

112112
console.log(`[${++i}/${steps}] Copying plugin data...`);
113-
let pluginFiles = walk(pluginDir).filter(x=>!x.endsWith('.ts'));
114-
pluginFiles.forEach(x=>{
115-
fs.copyFileSync(x, x.replace('src','dist'))
116-
})
113+
let pluginFiles = walk(pluginDir).filter((x) => !x.endsWith(".ts"));
114+
pluginFiles.forEach((x) => {
115+
fs.copyFileSync(x, x.replace("src", "dist"));
116+
});

src/util/plugin/PluginConfig.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ function applyConfig(val: any) {
5757
if (!pair) pair = new PluginConfigEntity();
5858

5959
pair.key = key;
60-
pair.value = obj;
61-
if (!pair.key || pair.key == null) {
62-
console.log(`[PluginConfig] WARN: Empty key`);
63-
console.log(pair);
64-
if (Environment.isDebug) debugger;
65-
} else return pair.save();
60+
if (pair.value != obj) {
61+
pair.value = obj;
62+
if (!pair.key || pair.key == null) {
63+
console.log(`[PluginConfig] WARN: Empty key`);
64+
console.log(pair);
65+
if (Environment.isDebug) debugger;
66+
} else return pair.save();
67+
}
6668
}
6769
if (process.env.PLUGIN_CONFIG_PATH) {
6870
if (Environment.isDebug) console.log(`Writing config: ${process.env.PLUGIN_CONFIG_PATH}`);

0 commit comments

Comments
 (0)