fix(frontend): 本番環境で不必要なconsole.logを出さないように (#15702)

This commit is contained in:
かっこかり 2025-03-25 08:02:06 +09:00 committed by GitHub
parent 3f7a2bf5b5
commit 5513337198
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View file

@ -142,11 +142,11 @@ export class PreferencesManager {
const v = JSON.parse(JSON.stringify(value)); // deep copy 兼 vueのプロキシ解除
if (deepEqual(this.s[key], v)) {
console.log('(skip) prefer:commit', key, v);
if (_DEV_) console.log('(skip) prefer:commit', key, v);
return;
}
console.log('prefer:commit', key, v);
if (_DEV_) console.log('prefer:commit', key, v);
this.rewriteRawState(key, v);
@ -250,13 +250,13 @@ export class PreferencesManager {
if (!deepEqual(cloudValue, record[1])) {
this.rewriteRawState(key, cloudValue);
record[1] = cloudValue;
console.log('cloud fetched', key, cloudValue);
if (_DEV_) console.log('cloud fetched', key, cloudValue);
}
}
}
this.save();
console.log('cloud fetch completed');
if (_DEV_) console.log('cloud fetch completed');
}
public static newProfile(): PreferencesProfile {

View file

@ -153,7 +153,7 @@ export async function restoreFromCloudBackup() {
scope: ['client', 'preferences', 'backups'],
});
console.log(keys);
if (_DEV_) console.log(keys);
if (keys.length === 0) {
os.alert({
@ -179,7 +179,7 @@ export async function restoreFromCloudBackup() {
key: select.result,
});
console.log(profile);
if (_DEV_) console.log(profile);
miLocalStorage.setItem('preferences', JSON.stringify(profile));
miLocalStorage.setItem('hidePreferencesRestoreSuggestion', 'true');