fix(frontend): 本番環境で不必要なconsole.logを出さないように (#15702)
This commit is contained in:
parent
3f7a2bf5b5
commit
5513337198
|
@ -380,7 +380,7 @@ function prepend(item: MisskeyEntity): void {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(isHead(), isPausingUpdate);
|
if (_DEV_) console.log(isHead(), isPausingUpdate);
|
||||||
|
|
||||||
if (isHead() && !isPausingUpdate) unshiftItems([item]);
|
if (isHead() && !isPausingUpdate) unshiftItems([item]);
|
||||||
else prependQueue(item);
|
else prependQueue(item);
|
||||||
|
|
|
@ -142,11 +142,11 @@ export class PreferencesManager {
|
||||||
const v = JSON.parse(JSON.stringify(value)); // deep copy 兼 vueのプロキシ解除
|
const v = JSON.parse(JSON.stringify(value)); // deep copy 兼 vueのプロキシ解除
|
||||||
|
|
||||||
if (deepEqual(this.s[key], v)) {
|
if (deepEqual(this.s[key], v)) {
|
||||||
console.log('(skip) prefer:commit', key, v);
|
if (_DEV_) console.log('(skip) prefer:commit', key, v);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('prefer:commit', key, v);
|
if (_DEV_) console.log('prefer:commit', key, v);
|
||||||
|
|
||||||
this.rewriteRawState(key, v);
|
this.rewriteRawState(key, v);
|
||||||
|
|
||||||
|
@ -250,13 +250,13 @@ export class PreferencesManager {
|
||||||
if (!deepEqual(cloudValue, record[1])) {
|
if (!deepEqual(cloudValue, record[1])) {
|
||||||
this.rewriteRawState(key, cloudValue);
|
this.rewriteRawState(key, cloudValue);
|
||||||
record[1] = cloudValue;
|
record[1] = cloudValue;
|
||||||
console.log('cloud fetched', key, cloudValue);
|
if (_DEV_) console.log('cloud fetched', key, cloudValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.save();
|
this.save();
|
||||||
console.log('cloud fetch completed');
|
if (_DEV_) console.log('cloud fetch completed');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static newProfile(): PreferencesProfile {
|
public static newProfile(): PreferencesProfile {
|
||||||
|
|
|
@ -153,7 +153,7 @@ export async function restoreFromCloudBackup() {
|
||||||
scope: ['client', 'preferences', 'backups'],
|
scope: ['client', 'preferences', 'backups'],
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(keys);
|
if (_DEV_) console.log(keys);
|
||||||
|
|
||||||
if (keys.length === 0) {
|
if (keys.length === 0) {
|
||||||
os.alert({
|
os.alert({
|
||||||
|
@ -179,7 +179,7 @@ export async function restoreFromCloudBackup() {
|
||||||
key: select.result,
|
key: select.result,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(profile);
|
if (_DEV_) console.log(profile);
|
||||||
|
|
||||||
miLocalStorage.setItem('preferences', JSON.stringify(profile));
|
miLocalStorage.setItem('preferences', JSON.stringify(profile));
|
||||||
miLocalStorage.setItem('hidePreferencesRestoreSuggestion', 'true');
|
miLocalStorage.setItem('hidePreferencesRestoreSuggestion', 'true');
|
||||||
|
|
|
@ -32,7 +32,7 @@ mainRouter.addListener('replace', ctx => {
|
||||||
});
|
});
|
||||||
|
|
||||||
mainRouter.addListener('change', ctx => {
|
mainRouter.addListener('change', ctx => {
|
||||||
console.log('mainRouter: change', ctx.fullPath);
|
if (_DEV_) console.log('mainRouter: change', ctx.fullPath);
|
||||||
analytics.page({
|
analytics.page({
|
||||||
path: ctx.fullPath,
|
path: ctx.fullPath,
|
||||||
title: ctx.fullPath,
|
title: ctx.fullPath,
|
||||||
|
|
|
@ -8,4 +8,4 @@ import { v4 as uuid } from 'uuid';
|
||||||
// HMR有効時にバグか知らんけど複数回実行されるのでその対策
|
// HMR有効時にバグか知らんけど複数回実行されるのでその対策
|
||||||
export const TAB_ID = window.sessionStorage.getItem('TAB_ID') ?? uuid();
|
export const TAB_ID = window.sessionStorage.getItem('TAB_ID') ?? uuid();
|
||||||
window.sessionStorage.setItem('TAB_ID', TAB_ID);
|
window.sessionStorage.setItem('TAB_ID', TAB_ID);
|
||||||
console.log('TAB_ID', TAB_ID);
|
if (_DEV_) console.log('TAB_ID', TAB_ID);
|
||||||
|
|
Loading…
Reference in New Issue